我使用bitbucket托管一些git存储库。
当我尝试这样做的时候:
git pull && git push我得到了:
mux_client_request_session: session request failed: Session open refused by peer
ControlSocket /home/ravi/.ssh/sockets/socket-git@bitbucket.org:22 already exists, disabling multiplexing发布于 2018-09-25 18:29:47
ssh,所以编辑您的~.ssh/config文件,使其在连接时不会尝试多路复用。
如果您在顶级配置中使用了ControlMaster,请确保将其删除,因为它会取代任何Host节配置。
然后添加:
Host bitbucket.??? # .org and .com
ControlMaster no
Host *
ControlMaster auto
ControlPersist yes
ControlPath ~/.ssh/socket-%r@%h:%p请注意,Host bitbucket.org必须在Host *之前。
此外,ControlPath应该只对您自己可写。
然后,如果错误消息中指定的ControlSocket仍然存在,请将其删除。(它会根据ControlPersist中的超时时间自动删除。
发布于 2020-06-23 15:10:14
另一种方法是在本地存储库配置中更改git ssh命令,并禁用多路复用模式。
git config --local core.sshCommand "ssh -o ControlPath=none"https://stackoverflow.com/questions/52496020
复制相似问题