Linux中Git连接到Github的问题

最近在学习Linux和Git,在把本地的测试文件push到Github中,出现了以下几个问题:

1.remote: Support for password authentication was removed on August 13, 2021
2.Failed to connect to github.com port 443
3.Failed to connect to 127.0.0.1 port 1080

我们来依次解决:

首先,先输入以下几个命令:

git remote --verbose

来查看当前已有的连接

然后输入:

git push origin master

发现报错【1】:

remote: Support for password authentication was removed on August 13, 2021

发现时Github的ssh不再使用,解决方案参见:
remote: Support for password authentication was removed

然后再试一次,还是报错【2】:

Failed to connect to github.com port 443

解决方案参考:git clone出现 fatal: unable to access

然后就OK了。

不过有时候还有另一个错误【3】:

Failed to connect to 127.0.0.1 port 1080: Connection refused

是代理的问题
输入:

git config --global --unset http.proxy
git config --global http.proxy 

即可解决。

你可能感兴趣的:(信息收集,git,github,linux)