130

I'm using the github Gui from their website to manage my repos, and I'm getting the following error:

fatal: https://github.com/TeaCodie/TeaCodie-Website.git/info/refs not found: 
did you run git update-server-info on the server?

How can I fix this?

Mat
  • 202,337
  • 40
  • 393
  • 406
Paul
  • 1,317
  • 2
  • 8
  • 3
  • 4
    What operation were you performing that raised this error? Is it a brand new repo? And if so, did you follow the initial instructions for making a first checkin? – jdi Feb 18 '12 at 17:12
  • @jdi: Obviously `git remote add something https://github.com/username/my_project.git` and then `git push something`. – Boris Stitnicky Apr 10 '13 at 10:49
  • 10
    This is Git-speak for "Repository not found. You may have mistyped something." LOL – Luke Puplett Apr 19 '13 at 10:29

20 Answers20

77

You might have changed your repository name

In your local repository edit the file:

.git/config

Then check:

[remote "origin"]
   url = 

that the URL matches your remote repository

Javier Giovannini
  • 2,302
  • 1
  • 19
  • 21
  • 5
    With newer versions of git you can do this from the command line: git remote set-url origin git@github.com:repoaccountname/repo-name.git – Arjun Mehta Apr 09 '14 at 23:14
44

Did you create a new repository on the http://github.com with the same name?

If not, do it! And make sure each letter is correct and case sensitive.

navins
  • 3,429
  • 2
  • 28
  • 29
27

In my case my github account did not have permissions to the repo. Added the github account as a collaborator for the repo and that fixed it.

amolk
  • 1,387
  • 13
  • 13
14

This error mostly caused by WRONG URL, please check:

  • http or https
  • URL Name
  • username@git_url
  • wrong git name
Wendy William
  • 305
  • 2
  • 4
9

It looks like that's a private (or deleted) repository; if you visit the repository page while logged it'll give you the real URL, which'll probably be https://TeaCodie@github.com/TeaCodie/TeaCodie-Website.git , i.e. with a username specified?

FauxFaux
  • 2,445
  • 16
  • 20
7

Also make sure the repo you've entered is cased correctly (it's case sensitive).

alexvance
  • 1,114
  • 1
  • 11
  • 31
6

I got the same problem while using a github repository, and connecting to it via https, while using the OS X Keychain Credential helper.

My problem was that I had the wrong credentials stored in OS X's Keychain (I was using the email address that I used to sign up for github.com rather than the [username]@github.com address it provides you). I deleted the old account in the keychain and only left the @github.com one and it fixed the problem.

Not sure if it is related, but when I checked the user.email local config:

git config -l

it showed the incorrect email address as well, so I updated the local git user.email to use the correct account too:

git config user.email <username>@github.com
Senseful
  • 86,719
  • 67
  • 308
  • 465
6

My issue was that I used the clone https url widget provided by github. That URL doesn't work for private repositories as you need to add a username to the front of it.

Example: a private repo owned by john and named widget with collaborator sam the correct url would be:

https://sam@github.com/john/widget.git

The github provided url:

https://github.com/john/widget.git

The error message leaves much to be desired.

John LaBarge
  • 149
  • 1
  • 9
5

Make sure that your user account is added to the repository as a collaborator.

Setting --> Collaborators

Mark
  • 3,389
  • 2
  • 28
  • 52
2

This happened to me and at first it was not apparent what had gone wrong. The previous day I had renamed my repo on github.com only changing the first character of the repo name from a lowercase letter to uppercase. I was not aware that the repo name in the origin URL was case-sensitive unit I received the error which contained the text, "did you run git update-server-info on the server." Once I edited the .git/config file to correct the case of the same letter in the origin URL, the problem was solved, the error no longer occurred and I was once again able to push my changes up to the repo on github.com. Another bit of advice: if you make changes to your repo on github, make sure to test sync'ing your local repo right away. In my case, I did not and it was the next day when I had tried to sync and couldn't because of the error and I forgot that I had renamed the repo, so I was scratching my head for a bit. Had I tested sync'ing right away, I would have caught this problem right away.

Wade
  • 356
  • 2
  • 7
2

I met up with the same problem.
How I solved this problem is:
I use git bash to create a new repo, when I typed "git push origin master" It reported

"fatal: https://github.com/TeaCodie/TeaCodie-Website.git/info/refs not found: did you run git update-server-info on the server?"

Finally, I found there was not a repo on the github at all.
You'd better create a new repo first on github.

Maybe this experience can help somebody.

Seth Tisue
  • 29,985
  • 11
  • 82
  • 149
FrankFan
  • 57
  • 5
1

I received this same error when I attempted to git clone something from Kiln what was actually a Mercurial repository.

John Rasch
  • 62,489
  • 19
  • 106
  • 139
0

In my case I was using the wrong protocol in the repository URL (http instead of https)

Julien
  • 1,158
  • 9
  • 19
0

This error could also happen if the repository you are attempting to reach was deleted.

wonton
  • 7,568
  • 9
  • 56
  • 93
0

In my case I had old version of the git. Upgrade to latest version fixed this issue.

Sergey Demchenko
  • 2,924
  • 1
  • 24
  • 26
0

probably you were trying to clone like this:

git clone https://github.com/TeaCodie/TeaCodie-Website.git

Then you got this error:

fatal: https://github.com/TeaCodie/TeaCodie-Website.git/info/refs not found: did you run git update-server-info on the server?

Here is what worked for me:

git clone https://github.com/TeaCodie/TeaCodie-Website.git/.git

because the directory "info/refs" is in the .git directory.

David Beckwith
  • 2,679
  • 1
  • 17
  • 11
0

In my repo's directory on my machine in the terminal I had to reset the origin url:

git remote set-url origin git@github.com:repoaccountname/repo-name.git
Arjun Mehta
  • 2,500
  • 1
  • 24
  • 40
0

I got this issue when using GitStack. I looked into C:/GitStack/apache/logs/error.log and found that GitStack was looking for the repository in the wrong location although its settings said D:/Repositories (my custom location), GitStack looked for the repositories in its default location. So I simply went and save the settings again from GitStack admin page. It solved the problem.

Gautam Jain
  • 6,789
  • 10
  • 48
  • 67
0

In my case, I was trying to clone a private repository in our group Github account to me laptop:

Yuqians-MacBook-Air:regenerateSNID yuqianliu$ git clone https://github.com/nyusngroup/velocity_CCSNe.git
Cloning into 'velocity_CCSNe'...
fatal: https://github.com/nyusngroup/velocity_CCSNe.git/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?

I found two ways can solve this.

(1) Use http instead of https. It asks me the name and password of our group Github account. After I entered the information, I can clone it.

Yuqians-MacBook-Air:regenerateSNID yuqianliu$ git clone http://github.com/nyusngroup/velocity_CCSNe.git
Cloning into 'velocity_CCSNe'...
Username for 'http://github.com':nyusngroup
Password for 'http://nyusngroup@github.com': 

(2) Add my Github account to the collaborators of the private repository in our group Github account, as pointed by Monkey King's answer above.

yuqian
  • 257
  • 3
  • 10
0

I encountered this message when using Jenkins 2.176.1 and git plugin 3.10.0 using a very old command line git version (1.7.1) as included on CentOS 6.

The message does not occur on newer versions of command line git (1.8 or later) with the Jenkins git plugin.

Upgrading to a newer command line git version resolves the problem.

Officially, the Jenkins git plugin does not support command line git 1.7.1. The minimum supported version is command line git 1.7.10. Many Jenkins git plugin use cases require at least command line git 1.9.0.

Command line git 1.7.1 behaves differently than later versions when a repository has been initialized (with git init) and then a git fetch is performed with a refspec which references 'origin'. Later versions of command line git do not have the same problem.

Mark Waite
  • 1,351
  • 11
  • 13