使用git push指令的时候没任何反应,过一段时候后输出:
ssh: connect to host 10.48.8.10 port 22: Connection timed out
fatal: Could not read from remote repository.
解决方式:
1. vim /root/.ssh/config
2. 输入以下内容:
host gitlab.com
Hostname altssh.gitlab.com
User git
Port 443
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
-----------------------------------------------
gitlab登录账号(比如修改了密码)发生了变化,也会导致此种情况。
解决:
1。 控制台输出:git config --system --unset credential.helper
2. 重新配置新的账号和密码