Git fetch and pull both stopped working yesterday on the server (AWS instance).
$ git fetch
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
There are two repository clones on that instance, both giving the same error. git still works well from local PCs.
git remote -v
gives the same results on local PC and on the server; ssh [email protected]
works as it should ("Hi (name)! You've successfully authenticated, but GitHub does not provide shell access.")
There's one difference in behaviour: git pull origin st
+[Tab] used to expand to a branch name; now it expands to a name of the file in current directory (filename is not the same as branch name).
UPDATE: I tried re-creating remote: SSH version still fails, but HTTP worked.
According to this discussion in git mailing list, this is actually a problem on GitHub site.
UPDATE
output with GIT_TRACE=1
############# Local results #############
$ GIT_TRACE=1 git fetch
setup: git_dir: .git
setup: worktree: c:/Projects/(local_path)
setup: cwd: c:/Projects/(local_path)
setup: prefix: (null)
trace: built-in: git 'fetch'
trace: run_command: 'ssh' '[email protected]' 'git-upload-pack '\''(username)/(reponame).git'\'''
Enter passphrase for key '(keyname)':
trace: run_command: 'rev-list' '--quiet' '--objects' '--stdin' '--not' '--all'
############# AWS results #############
$ GIT_TRACE=1 git fetch
trace: built-in: git 'fetch'
trace: run_command: 'ssh' '[email protected]' 'git-upload-pack '\''(username)/(reponame).git'\'''
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
Problem solved.
Turns out that was a miscommunication on our side: the guy who setup the keys on that box left, and his access to GH repo has been revoked.
GitHub returns "repo not found" rather than "you have no access rights for this repository" - their support said they didn't want to leak the existence of a repo unless you have access rights to it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With