我有一个通过代理通过HTTPS访问的Bitbucket存储库。为此,我在Git中设置了http.proxy
和https.proxy
的选项。
现在,我将HTTPS更改为SSH。
这次,当我运行git pull
时,我得到:
Repository not found
The requested repository does not exist, or you do not have permission to access it.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
如果我像这样ping存储库:
ssh -vvv git@my-repo.com
建立连接后,我得到:
Authenticated to my-repo.com ([some-ip]:7999).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Entering interactive session.
debug2: callback start
debug2: fd 3 setting TCP_NODELAY
debug3: ssh_packet_set_tos: set IP_TOS 0x10
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug2: channel 0: request shell confirm 1
debug2: callback done
debug2: channel 0: open confirm rwindow 2097512 rmax 32678
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel_input_status_confirm: type 100 id 0
shell request failed on channel 0
如果显示远程
git remote -v
,答案是:origin git@my-repo.com:7999/my-project.git (fetch)
origin git@my-repo.com:7999/my-project.git (push)
我只想知道这是否失败:
托管Bitbucket存储库的计算机中的。
B 。在代理中
关于如何找到这个的任何想法?
最佳答案
从发布整个日志
ssh -Tvvv git@my-repo.com
从更新的日志中,该部分清楚地表明连接和身份验证正常:
Authenticated to my-repo.com ([some-ip]:7999).
讯息
Repository not found
说验证成功,但是存储库不在您应指定的位置。看一下输出
git remote -v
并确保服务器上的路径存在(它们可能不存在)。
您的
remote
格式不允许按manual page for git中所述指定端口。您应该使用显式的ssh://
格式,如下所示:ssh://git@my-repo.com:7999/my-project.git
关于git - 找出存储库或代理是否阻止了我的连接,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/42934451/