找出存储库或代理是否阻止了我的连接

时间:2017-03-21 17:40:30

标签: git ssh

我有一个Bitbucket存储库,我通过HTTPS访问,通过代理。为此,我在Git中设置了http.proxyhttps.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存储库的机器上

A

代理

B

我知道怎么能找到这个吗?

1 个答案:

答案 0 :(得分:1)

发布整个日志
OnOK()

从更新的日志中,这部分清楚地表明连接和身份验证正常:

ssh -Tvvv git@my-repo.com

消息

Authenticated to my-repo.com ([some-ip]:7999).

表示身份验证成功,但存储库不是您指定的位置。看看

的输出
Repository not found

并确保服务器上的路径存在(它们可能不存在)。

git remote -v 的格式不允许按manual page for git中的说明指定端口。您应该使用明确的remote格式,如下所示:

ssh://
相关问题