【git push 遇到的】fatal: unable to access ‘https://github.com/xxx.gi ...

打印 上一主题 下一主题

主题 1863|帖子 1863|积分 5593


媒介

   新建个堆栈,提交代码提示错误
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


(2)设置署理


(3)设置当地署理

在终端输入以下命令,设置 Git 使用当地署理:
  1. git config --global http.proxy http://127.0.0.1:7890
复制代码
(4)校验

设置完成后,可以通过以下命令查验是否设置乐成:
  1. 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存留的用户名和密码:

  1. 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”中的“关于快进的注意事项”。
    先拉取,后提交即可
  1. git pull origin master
  2. 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/’
   这个简朴,就是账号或者密码打错了
  
总结: 、

   署明白决不了的,重置即可。
需要注意的是,重置后每次提交和拉取都需要输入账号和密码,执行以下命令即可
  1. git config --global credential.helper store
复制代码
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

王國慶

论坛元老
这个人很懒什么都没写!
快速回复 返回顶部 返回列表