“did you run git update-server-info” error on a Gi

2019-01-12 23:24发布

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?

19条回答
甜甜的少女心
2楼-- · 2019-01-12 23:28

This error mostly caused by WRONG URL, please check:

  • http or https
  • URL Name
  • username@git_url
  • wrong git name
查看更多
forever°为你锁心
3楼-- · 2019-01-12 23:29

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
查看更多
三岁会撩人
4楼-- · 2019-01-12 23:30

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.

查看更多
放我归山
5楼-- · 2019-01-12 23:30

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
查看更多
冷血范
6楼-- · 2019-01-12 23:34

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

Setting --> Collaborators

查看更多
一夜七次
7楼-- · 2019-01-12 23:38

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.

查看更多
登录 后发表回答