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"
目录
相关文章
|
2月前
|
算法 安全 网络安全
git clone操作报错diffie-hellman-group1-sha1的解决方案
在处理这一问题时,需要确保了解相关操作的安全影响。`diffie-hellman-group1-sha1`算法被认为是不够安全的,这是因为随着计算能力的提高,`SHA-1`算法可以在合理的时间内被破解,而且其对应的 `1024位`Diffie-Hellman组也可能不够强大。因此,在确保Git操作的同时,也要考虑提升安全性的长期解决办法。强烈推荐与管理员或相关技术支持团队合作,升级和加强服务器端的安全配置。
93 12
|
5月前
|
Shell 开发工具 git
解决git bash报错:在仓库中检测到可疑的所有权
总的来说,解决“在仓库中检测到可疑的所有权”的报错,关键在于理解和调整文件或目录的所有权。只要我们正确地设置了文件或目录的所有权,那么我们就可以避免这种问题,让Git Bash正常工作。
224 22
|
3月前
|
网络协议 开发工具 git
解决 git 报错 “fatal: unable to access ‘https://github.com/.../.git‘: Recv failure Connection was rese
在使用 Git/Git小乌龟 进行代码管理的过程中,经常会遇到各种各样的问题,其中之一就是在执行 git clone 或 git pull 等操作时出现 “fatal: unable to access ‘https://github.com/…/.git’: Recv failure Connection was reset” 的报错。这个问题通常是由网络连接问题或代理设置不正确导致的。在我的个人使用经验中,我亲自尝试了四种方法,它们都能够有效地解决这个报错。个人比较推荐方法二。
1814 0
|
6月前
|
开发工具 git 索引
warning: You ran ‘git add’ with neither ‘-A (—all)’ or ‘—ignore-removal’,报错如何解决 git报错 ‘git add —ignore-removal <pathspec>优雅草卓伊凡
warning: You ran ‘git add’ with neither ‘-A (—all)’ or ‘—ignore-removal’,报错如何解决 git报错 ‘git add —ignore-removal <pathspec>优雅草卓伊凡
101 21
warning: You ran ‘git add’ with neither ‘-A (—all)’ or ‘—ignore-removal’,报错如何解决 git报错 ‘git add —ignore-removal <pathspec>优雅草卓伊凡
|
7月前
|
开发工具 git
git 使用之remote: File [4e21e71a555febaa4dfaaa05cf7eeb606ea96ae2] size 104.090MB, exceeds quota 100MB remote: Please remove the file[s] from history and try again 报错如何解决-优雅草卓伊凡
git 使用之remote: File [4e21e71a555febaa4dfaaa05cf7eeb606ea96ae2] size 104.090MB, exceeds quota 100MB remote: Please remove the file[s] from history and try again 报错如何解决-优雅草卓伊凡
625 3
git 使用之remote: File [4e21e71a555febaa4dfaaa05cf7eeb606ea96ae2] size 104.090MB, exceeds quota 100MB remote: Please remove the file[s] from history and try again 报错如何解决-优雅草卓伊凡
|
11月前
|
存储 开发工具 数据安全/隐私保护
git报错The project you were looking for could not be found 解决方式
git报错The project you were looking for could not be found 解决方式
2954 1
|
机器学习/深度学习 Shell 开发工具
Python使用管道执行git命令报错|4-7
Python使用管道执行git命令报错|4-7
|
开发工具 git
【Azure App Service】App Service设置访问限制后,使用git clone代码库出现403报错
【Azure App Service】App Service设置访问限制后,使用git clone代码库出现403报错
199 3
|
开发工具 Android开发 git
解决Idea报错出现Git is not installed
解决Idea报错出现Git is not installed
4046 2
|
存储 Shell 开发工具
8-8|windows上Git报错
8-8|windows上Git报错