问题
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?
回答1:
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
回答2:
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.
回答3:
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.
回答4:
This error mostly caused by WRONG URL, please check:
- http or https
- URL Name
- username@git_url
- wrong git name
回答5:
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?
回答6:
Also make sure the repo you've entered is cased correctly (it's case sensitive).
回答7:
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
回答8:
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.
回答9:
Make sure that your user account is added to the repository as a collaborator.
Setting --> Collaborators
回答10:
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.
回答11:
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.
回答12:
I received this same error when I attempted to git clone
something from Kiln what was actually a Mercurial repository.
回答13:
In my case I was using the wrong protocol in the repository URL (http instead of https)
回答14:
This error could also happen if the repository you are attempting to reach was deleted.
回答15:
In my case I had old version of the git. Upgrade to latest version fixed this issue.
回答16:
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.
回答17:
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
回答18:
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.
回答19:
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.
回答20:
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.
来源:https://stackoverflow.com/questions/9343189/did-you-run-git-update-server-info-error-on-a-github-repository