“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:47

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.

查看更多
爷的心禁止访问
3楼-- · 2019-01-12 23:48

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.

查看更多
我只想做你的唯一
4楼-- · 2019-01-12 23:49

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

查看更多
乱世女痞
5楼-- · 2019-01-12 23:49

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.

查看更多
Root(大扎)
6楼-- · 2019-01-12 23:52

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

查看更多
看我几分像从前
7楼-- · 2019-01-12 23:52

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

查看更多
登录 后发表回答