Paul
Paul

Reputation: 1317

"did you run git update-server-info" error on a Github repository

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?

Upvotes: 130

Views: 108503

Answers (20)

Mark Waite
Mark Waite

Reputation: 1500

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.

Upvotes: 0

yuqian
yuqian

Reputation: 277

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://[email protected]': 

(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.

Upvotes: 0

Gautam Jain
Gautam Jain

Reputation: 6849

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.

Upvotes: 0

Arjun Mehta
Arjun Mehta

Reputation: 2542

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

git remote set-url origin [email protected]:repoaccountname/repo-name.git

Upvotes: 0

FrankFan
FrankFan

Reputation: 57

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.

Upvotes: 2

David Beckwith
David Beckwith

Reputation: 2789

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.

Upvotes: 0

John LaBarge
John LaBarge

Reputation: 158

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://[email protected]/john/widget.git

The github provided url:

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

The error message leaves much to be desired.

Upvotes: 6

Sergey Demchenko
Sergey Demchenko

Reputation: 2954

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

Upvotes: 0

Mark
Mark

Reputation: 3389

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

Setting --> Collaborators

Upvotes: 5

Senseful
Senseful

Reputation: 91701

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

Upvotes: 6

navins
navins

Reputation: 3469

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.

Upvotes: 44

John Rasch
John Rasch

Reputation: 63445

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

Upvotes: 1

Wade
Wade

Reputation: 356

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.

Upvotes: 2

wonton
wonton

Reputation: 8247

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

Upvotes: 0

Javier Giovannini
Javier Giovannini

Reputation: 2352

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

Upvotes: 77

Wendy William
Wendy William

Reputation: 305

This error mostly caused by WRONG URL, please check:

  • http or https
  • URL Name
  • username@git_url
  • wrong git name

Upvotes: 14

Julien
Julien

Reputation: 1158

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

Upvotes: 0

alexvance
alexvance

Reputation: 1124

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

Upvotes: 7

amolk
amolk

Reputation: 1397

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.

Upvotes: 27

FauxFaux
FauxFaux

Reputation: 2515

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://[email protected]/TeaCodie/TeaCodie-Website.git , i.e. with a username specified?

Upvotes: 9

Related Questions