前提条件:
问题:
ssh: Could not resolve hostname github.com: Non-recoverable failure in name resolution
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: unable to access 'https://github.com/bu0113/githubtest1.git/': Couldn't connect to server
ssh -T git@github.com
得到下面结果Hi bu0113! You've successfully authenticated, but GitHub does not provide shell access.
netsh winsock reset
还是不行这到底是因为什么呀,快给俺整自闭了。
git config --global --unset http.proxy
git config --global --unset https.proxy
猜测这台电脑很久了,最初的用户名是中文的,后来我改过一次。
所以在cmd和vscde终端上运行都是admin/c/ 这种开头的命令行
而最神奇的是在git bash创建口打开依旧是之前的中文用户名:张三@/user/程序 这种开头的命令行。
可能原因是出在这里。??
有时候需要访问外网
应该是防火墙的原因
关闭防火墙
命令 :systemctl stop firewalld
设置里面打开网页代理
1.关闭防火墙
命令 :systemctl stop firewalld
2.ssh -T git@github.com , 重新添加ssh key