问题描述
我使用bitbucket托管一些git存储库.
I use bitbucket to host some git repositories.
当我尝试做时:
git pull && git push
我得到:
mux_client_request_session: session request failed: Session open refused by peer
ControlSocket /home/ravi/.ssh/sockets/[email protected]:22 already exists, disabling multiplexing
推荐答案
bitbucket.org故意禁用了ssh多路复用,因此请编辑您的~.ssh/config
文件,以便ssh在连接到该文件时不会尝试进行多路复用.
bitbucket.org has intentionally disabled ssh multiplexing, so edit your ~.ssh/config
file so ssh doesn't try to multiplex when connecting to it.
如果您在配置的顶层具有ControlMaster
,请确保将其删除,因为它会取代任何Host
部分的配置.
If you have ControlMaster
at the top level of config, make sure it is removed as it supersedes any Host
section configuration.
然后添加:
Host bitbucket.??? # .org and .com
ControlMaster no
Host *
ControlMaster auto
ControlPersist yes
ControlPath ~/.ssh/socket-%r@%h:%p
请注意,Host bitbucket.org
必须在Host *
之前.
此外,ControlPath
应该只能自己写.
Also, the ControlPath
should only be writable by yourself.
然后,如果错误消息中命名的ControlSocket
仍然存在,请将其删除. (它将根据ControlPersist
中的超时自动删除.
Then, if the ControlSocket
named in the error message is still there, delete it. (It will auto-delete based upon the timeout in ControlPersist
.
这篇关于mux_client_request_session:会话请求失败:会话打开被同级拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!