【git push 遇到的】fatal: unable to access ‘https://github.com/xxx.git/‘: Failed to c
媒介新建个堆栈,提交代码提示错误
git push origin master 提示以下错误
fatal: unable to access ‘https://gitee.com/xxx/xxx.git/’: Failed to connect to 127.0.0.1 port 7890: Connection refused
一、端口
1. 问题
fatal: unable to access ‘https://gitee.com/xxx/xxx.git/’: Failed to connect to 127.0.0.1 port 7890: Connection refused
致命:无法访问’https://gitee.com/xxx/xxx.git/':无法毗连到127.0.0.1端口7890:毗连被拒绝
2. 办理
(1)打开网络和interent
https://i-blog.csdnimg.cn/direct/4796db82a2d644e38d35ff3fc880a325.png
(2)设置署理
https://i-blog.csdnimg.cn/direct/53e910fc3d464339804405cd9e0184cb.png
(3)设置当地署理
在终端输入以下命令,设置 Git 使用当地署理:
git config --global http.proxy http://127.0.0.1:7890
(4)校验
设置完成后,可以通过以下命令查验是否设置乐成:
git config --global -l
正常来说,这里就办理了,但是仍旧push失败,报错如下
二、问题2——身份验证失败
1. 身份验证失败
fatal: Authentication failed for ‘https://gitee.com/xxx/ql-xxx.git/’
致命:“”的身份验证失败https://gitee.com/xxx/ql-xxx.git/’
2.办理
(1)清空git存留的用户名和密码:
git config --system --unset credential.helper
注意点:需要以管理员身份执行,不然没有权限
(2)输入账号密码即可
三、问题3——需求先拉取,后提交
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: ‘git pull …’) before pushing again.
hint: See the ‘Note about fast-forwards’ in ‘git push --help’ for details.
提示:更新被拒绝,因为您当前分支的提示已掉队
提示:它的远程对应物。整合远程更改(例如。
提示:‘git pull…’)在再次推动之前。
提示:有关详细信息,请参阅“git push-help”中的“关于快进的注意事项”。
先拉取,后提交即可
git pull origin master
git push origin master
四、问题4——上游有分支了
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin master
致命:当前分支主机没有上游分支。
要推动当前分支并将远程设置为上游,请使用
git push --set-upstream origin master
五、账号密码错误提示
remote: da: Incorrect username or password (access token)
fatal: Authentication failed for ‘https://gitee.com/xxx/xxx.git/’
remote:da:用户名或密码(访问令牌)不准确
致命:“”的身份验证失败https://gitee.com/xxx/xxx.git/’
这个简朴,就是账号或者密码打错了
总结: 、
署明白决不了的,重置即可。
需要注意的是,重置后每次提交和拉取都需要输入账号和密码,执行以下命令即可
git config --global credential.helper store
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]