30
votes

I'm trying to clone an existing github-repository (Git for Windows) to an empty folder using

git clone https://github.com/di98jgu/D0016E---Digitalt-projekt.git

but keep getting the error message:

fatal: https://github.com/di98jgu/D0016E---Digitalt-projekt.git/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?

The server is working fine (others are using it). Have tried adding the paths of git-upload-pack and git-receive-pack to gitconfig,

[remote "origin"] 
url = https://github.com/di98jgu/D0016E--Digital-projekt.git 
fetch = +refs/heads/*:refs/remotes/origin/* 
uploadpack = libexec/git-core/git-upload-pack
receivepack = libexec/git-core/git-receive-pack

but it didn't help. Seems like a lot of people are having problems causing a similar, but not exactly the same, error message git-upload-pack command not found, but don't think these solutions apply to my situation.

Anyone know how to solve this?

17
Works for me so the problem is probably on the client side. You could try reinstalling Git.Thomas
That's possibly a typo in the URL. Have you tried using the SSH protocol?Nevik Rehnel
this might also mean a permissions issue (you don't have write permissions on the server)rogerdpack
@NevikRehnel is correct, switch to SSH protocol.Davem M

17 Answers

10
votes

I just come across this issue right now, it is caused by permissions, please make sure that you current account has the permissions of git pull and git push,in your case , maybe you create a private repository in Github, and not add this account as Manage Collaborators, then the issue come.

Certainly you also should check if the remote URL is completely correct, include case insensitive, https or http.

10
votes

This happened to me when I renamed my project on Github. In my case I changed the capitalization. The fix is to edit .git/config in your project and make sure the remote URL for github reflects the updated project name.

6
votes

Removing the s from https solved my problem.

2
votes

If you change the owner of a repository, for example in bitbucket, its url will change -- and trying to push or pull you will start getting this error.

In this case you will need to change the remote origin url in the local configuration file $WORKDIR/.git/config

2
votes

In case the repository is private then check if your github userid is allowed to access that repository.

1
votes

I just got the same error. I use the git update-server-info, but with no luck. I copied the url into browser, it's available. It turns out the git path is case insentive. I checked the github path in the browser, some characters in the parent path is capitalized. Then I tried the exact path as the page tells me, bang! It works like a charm.

1
votes

I get this error whenever I try to clone a repository and forget to capitalize the url correctly.

If your repository is github.com/myrepos/Repo.git, you need to check it out with git clone https://github.com/myrepos/Repo.git using git clone https://github.com/myrepos/repo.git (with "repo" in lower case) will cause the error you saw.

1
votes

I had this problem when I mistakenly tried to git clone a repo that was actually a Mercurial repo. Someone else created the project and I'd never used Mercurial before.

Felt like an idiot, but I couldn't find any answers on SO that fixed it. Whoops!

0
votes

This is very likely a problem on the client side. Do you still have this problem? Maybe try reinstalling git.

As far as I saw you are developing an android app and therefore most likely are using Eclipse. There is an eclipse plugin for git: http://www.eclipse.org/egit/

0
votes

You have two typos in the URL:

https://github.com/di98jgu/D0016E--Digital-projekt.git

Should be:

https://github.com/di98jgu/D0016E---Digitalt-projekt.git

See the extra hyphen - and t before and after Digital

Thanks for asking the question. I was having trouble cloning gitorious and kept typing gitorius, and was getting the same error as you. Some of the answers here made me look more closely at the URL, and check on the website.

https://gitorious.org/gitorious/ce-installer.git
0
votes

this is what you can do to fix this problem.

  1. log in to github
  2. create a repository and name it the same name as your project
  3. push the project again by doing the following:

a. 1. git remote remove origin a. 2. git remote add origin https://github.com//sample_app.git b. git push -u origin master c. enter your username d. enter your password

HOPE IT WORKS FOR YOU

0
votes

I removed the .git part, and it worked!

0
votes

This suddenly started happening to me as well. In .git/config I switched my https version of the repository url to the git@github version. To push/pull successfully I had to create an ssh key following the instructions on github (account settings -> ssh keys).

Everything works great now!

0
votes

We have got the same problem and it was due to the fact git was put in the PATH through the .bash_profile Since .bash_profile is only sourced on interactive sessions it did not work.

We solved the problem by putting git in the PATH through the .bash.rc instead.

0
votes

I had the same message.

Cause: I was using https to access the repo and I had changed my github.com password. OSX was using an old password from the keychain. I had to delete various github.com entries from the keychain to get it to prompt for password again when I ran git fetch.

See more here: https://help.github.com/articles/updating-credentials-from-the-osx-keychain/

0
votes

I had this problem when git was not installed on the remote serving machine where the git repo was otherwise correctly. Upgrading server software.

0
votes

In my case, the project was hosted in Gitlab and when I moved it to another group which caused our build pipelines to throw the mentioned error.

In order to fix the issue, I updated the credentials being used in the pipeline with one of the permitted members of the new group.