Git取/拉已停止工作 [英] Git fetch/pull have stopped working

查看:207
本文介绍了Git取/拉已停止工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

git fetch和pull两者都停止在服务器上工作(AWS实例)。错误:找不到存储库。
致命:远程端意外挂起

该实例上有两个存储库克隆,都给出了同样的错误。 git remote -v 在本地PC上和在本地PC上给出了相同的结果

$ b

服务器; ssh git@github.com 可以正常工作(Hi(name)!你已经成功验证过,但GitHub不提供shell访问权限。)



行为有一个区别:用于扩展到分支名称的 git pull origin st + [Tab]现在它扩展为当前目录中文件的名称(文件名与分支名称不同)。


$ b 更新:我试过了-creating remote:SSH版本仍然失败,但HTTP工作。



根据

UPDATE



输出为 GIT_TRACE = 1

  #############本地结果############# 

$ GIT_TRACE = 1 git fetch
setup:git_dir:.git
setup:worktree:c:/ Projects /(local_path)
setup:cwd:c:/ Projects /(local_path)
setup:prefix :(空)
trace:内置:git'fetch'
trace:run_command:'ssh''git@github.com''git-upload-pack'\''(username) /(reponame).git'\'''
输入密钥'(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''git@github.com''git-upload-pack'\''(username)/(reponame).git'\'''
错误:找不到存储库。
fatal:远程终端意外挂起


解决方案

问题解决了。



原来,这是我们这边的沟通不畅:那个把那个盒子上的密钥设置好的人,他的GH repo访问权已被撤销。

GitHub返回找不到仓库,而不是您对这个仓库没有访问权限 - 他们的支持表示他们不想泄露回购的存在除非您有权访问它。


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 git@github.com 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' 'git@github.com' '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' 'git@github.com' '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.

这篇关于Git取/拉已停止工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆