Git——报错总结

简介: Git——报错总结

前言

git相关的报错汇总

错误汇总

上传文件需要密码

问题原因

1. 全局初始化是未添加邮箱
2. 远程地址使用HTTPS

解决方案

1.重新生成带有邮箱的公钥,并添加到平台 
ssh-keygen -t rsa -C "xxxxx@xxxxx.com"
2.删除原有的版本仓库,并使用SSH的地址重新添加远程仓库.
$ git remote -v //查看远程仓库
$ git remote remove xxx  //移除
$ git remote add xx git@gitee.com:xxxxxxx/xxx.git //重新添加远程地址

fatal: refusing to merge unrelated histories

问题原因

合并时报错提示拒绝合并不相关的历史

解决方案

git merge origin/src  --allow-unrelated-histories

failed to push some refs to 'git@101.132.150.182:cpic/SCRM-Admin-Web.git'

$ git push origin za:za
To 101.132.150.182:cpic/SCRM-Admin-Web.git
 ! [rejected]        za -> za (non-fast-forward)
error: failed to push some refs to 'git@<地址>:<仓库>.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.

问题原因

本地仓库和远程仓库联系断开

解决方法

1. 使用-f强制推送(不推荐该方法)
2. 拉取远程仓库到本地,重新建立 
  git pull <local-name> <remote-name>
  git add .
  git commit -m "xxx"
  git push <local-name> <local_branch_name>:<remote_branch_name>
3. $ git branch --set--upstream-to=origin/<branch-name> <branch_name> (对我无效)

fatal: unable to access 'https://github.com/wangyang0210/EasyBe.git/': OpenSSL SSL_read: Connection was reset, errno 10054

解决方法

关闭ssl的验证

git config --global http.sslVerify "false"
目录
相关文章
|
5天前
|
存储 开发工具 数据安全/隐私保护
git报错The project you were looking for could not be found 解决方式
git报错The project you were looking for could not be found 解决方式
37 1
|
1月前
|
机器学习/深度学习 Shell 开发工具
Python使用管道执行git命令报错|4-7
Python使用管道执行git命令报错|4-7
|
1月前
|
存储 Shell 开发工具
8-8|windows上Git报错
8-8|windows上Git报错
|
2月前
|
开发工具 git
【Azure App Service】App Service设置访问限制后,使用git clone代码库出现403报错
【Azure App Service】App Service设置访问限制后,使用git clone代码库出现403报错
|
2月前
|
开发工具 Android开发 git
解决Idea报错出现Git is not installed
解决Idea报错出现Git is not installed
481 2
|
3月前
|
网络安全 开发工具 git
【git】解决git报错:ssh:connect to host github.com port 22: Connection timed out 亲测有效
【git】解决git报错:ssh:connect to host github.com port 22: Connection timed out 亲测有效
823 1
|
4月前
|
Shell 开发工具 git
git拉去代码报错"Failed to connect to 127.0.0.1 port 31181: Connection refused"
在克隆`https://example.git/`时遇到错误:&quot;fatal: unable to access &#39;https://example.git/&#39;: Failed to connect to 127.0.0.1 port 31181: Connection refused&quot;。原因是Windows上代理设置未正确关闭,影响了Git配置。解决方法是通过git bash运行命令检查并取消代理:`git config --global http.proxy`和`git config --global --unset http.proxy`。
97 1
 git拉去代码报错"Failed to connect to 127.0.0.1 port 31181: Connection refused"
|
3月前
|
网络安全 开发工具 git
使用git克隆仓库报错:Warning: Permanently added‘github.com’ to the .....(ssh )
所以,你可以安全地忽略这个警告,它不会影响到你使用git克隆仓库。如果你已经成功克隆了仓库,那么一切都在正常工作。如果你在克隆过程中遇到其他问题,那可能需要查看具体的错误信息来解决。
78 0
|
5月前
|
Java 开发工具 git
云效产品使用报错问题之流水线获取git版本号后将其设置为环境变量失败如何解决
本合集将整理呈现用户在使用过程中遇到的报错及其对应的解决办法,包括但不限于账户权限设置错误、项目配置不正确、代码提交冲突、构建任务执行失败、测试环境异常、需求流转阻塞等问题。阿里云云效是一站式企业级研发协同和DevOps平台,为企业提供从需求规划、开发、测试、发布到运维、运营的全流程端到端服务和工具支撑,致力于提升企业的研发效能和创新能力。
|
5月前
|
算法 Java BI
云效产品使用报错问题之平台上导出的统计数据和 git 中使用命令导出的数据统计都对不上,如何解决
本合集将整理呈现用户在使用过程中遇到的报错及其对应的解决办法,包括但不限于账户权限设置错误、项目配置不正确、代码提交冲突、构建任务执行失败、测试环境异常、需求流转阻塞等问题。阿里云云效是一站式企业级研发协同和DevOps平台,为企业提供从需求规划、开发、测试、发布到运维、运营的全流程端到端服务和工具支撑,致力于提升企业的研发效能和创新能力。

相关实验场景

更多