git push 报错:failed to push some refs to 'git@git.xxxx:devops/thor.git'

Posted zhaoyunlong

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git push 报错:failed to push some refs to 'git@git.xxxx:devops/thor.git'相关的知识,希望对你有一定的参考价值。

error: failed to push some refs to git@git.caicaivip.com:devops/thor.git
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 origin 分支名

 

appledeMacBook-Air-70:thor apple$ git pull zyl
fatal: ‘zyl‘ does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

 

 

先查看你现在所在的分支

appledeMacBook-Air-70:thor apple$ git branch
  master
* zyl
  zylDev

 

然后执行:

git branch --set-upstream-to=origin/要push到分支名  本地分支名分支名
appledeMacBook-Air-70:thor apple$  git branch --set-upstream-to=origin/zyl zyl
Branch zyl set up to track remote branch zyl from origin.
appledeMacBook-Air-70:thor apple$ git pull
Auto-merging local_config.properties
CONFLICT (content): Merge conflict in local_config.properties
Automatic merge failed; fix conflicts and then commit the result.
appledeMacBook-Air-70:thor apple$ 

 

再pull拉取到本地解决配置文件的冲突

再push就可以成功了

 

以上是关于git push 报错:failed to push some refs to 'git@git.xxxx:devops/thor.git'的主要内容,如果未能解决你的问题,请参考以下文章

git push 报错failed to push some refs to‘xxx‘

解决git push报错:failed to push some refs to ‘git@github.com:anightmonarch/JavaEasyGoing.git‘

解决git push报错:failed to push some refs to ‘git@github.com:anightmonarch/JavaEasyGoing.git‘

解决git push报错:failed to push some refs to ‘git@github.com:anightmonarch/JavaEasyGoing.git‘

Git push 报错 "error: failed to push some refs to " 解决

git 常见冲突解决——git push遇到报错error: failed to push some refs to ‘git@git.xxx.com:xxx/xxx.git