标题: 【git push 遇到的】fatal: unable to access ‘https://github.com/xxx.git/‘: Failed to c [打印本页] 作者: 王國慶 时间: 2025-3-28 17:43 标题: 【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. 办理
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: [session-b942578c] da: Incorrect username or password (access token)
fatal: Authentication failed for ‘https://gitee.com/xxx/xxx.git/’
remote:[session-b942578c]da:用户名或密码(访问令牌)不准确
致命:“”的身份验证失败https://gitee.com/xxx/xxx.git/’
这个简朴,就是账号或者密码打错了 总结: 、