本文描述的错误按实际出现先后顺序排列,并且附上一些其他可能会出现的问题

错误1:

JZKJ@DESKTOP-I7Q9QJ4 MINGW64 ~
$ git clone https://gitee.com/moocang/005zhongbang-doc.git
Cloning into '005zhongbang-doc'...
remote: Incorrect username or password ( access token ) // 1
fatal: Authentication failed for 'https://gitee.com/moocang/005zhongbang-doc.git/'

原因分析和解决:

初次克隆gitee/git项目时,弹框提示输入账户和密码,如果操作失误导致账密输入错误,之后git bash提示错误但不再弹窗让再次输入账号密码。由于电脑凭证把第一次输入的账户密码记录了下来,导致后期一直错误。

需要修改账户名密码。

解决方式:

  1. Git Bash命令行

    如果发生错误1.1,就是说没有对配置文件C:/Program Files/Git/mingw64/etc/gitconfig的修改权限,因为它在C盘(系统盘)。

    错误1.1:
JZKJ@DESKTOP-I7Q9QJ4 MINGW64 ~
$ git config --system --unset credential.helper
error: could not lock config file C:/Program Files/Git/mingw64/etc/gitconfig: Permission denied //2

这里要么在自己的电脑授权(较麻烦),要么用管理员身份打开Git Bash。

2. Windows 凭据

进入控制面板\所有控制面板项\凭据管理器,找到普通凭据下的gitee凭据

git:https://gitee.com

点下拉三角展开,编辑或删除用户名和密码组成的凭据。

错误2(错误1已解决):

无法更新本地库。

JZKJ@DESKTOP-I7Q9QJ4 MINGW64 ~
$ git clone https://gitee.com/moocang/005zhongbang-doc.git
Cloning into '005zhongbang-doc'...
remote: You do not have permission to pull from the repository via HTTPS // 2
fatal: Authentication failed for 'https://gitee.com/moocang/005zhongbang-doc.git/'

发生这个错误的原因有很多,这里是我的gitee账户不在仓库的SSH公钥列表里,没有pull权限,想管理员申请吧自己加入团队即可。

错误2主要有以下几种情况:

  1. 没有pull权限
  2. 要用ssh访问而不是https
  3. 凭据错误

    可以参考这篇文章。

关于gitee的公钥管理可以参考官方文档,包括公钥管理‘、生成/添加SSH公钥、Git配置多个SSH-Key等内容。

[已解决]gitee初次使用git clone报错的更多相关文章

  1. centos git clone 报错 fatal: HTTP request failed 解决办法

    git clone报错提示 git clone https://github.com/xxxx.git Initialized empty Git repository in /root/xxxx/. ...

  2. 使用git clone 报错curl56 errno 10054解决方法

    使用git clone 报错curl56 errno 10054解决方法 ----------------版权声明:本文为CSDN博主「伽马射线爆」的原创文章,遵循CC 4.0 BY-SA版权协议,转 ...

  3. Git clone 报错 Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching cipher found. Their offer: aes128-cbc,3des-cbc,blowfish-cbc

    git clone 报错 Unable to negotiate with xxx.xxx.xxx.xxx. port 12345: no matching cipher found. Their o ...

  4. python进阶(六) 虚拟环境git clone报错解决办法

    在虚拟环境目录,进行git clone xxxxx.git  项目,报如下图错误 解决办法:env GIT_SSL_NO_VERIFY=true git clone xxxx.git

  5. linux 下解决git clone报错

    解决报错:error: The requested URL returned error: 401 Unauthorized while accessing   问题报错:error: The req ...

  6. git clone 报错 fatal: protocol '–https' is not supported 解决办法

    版本:git 2.22.0 系统:win7旗舰版 先把https去掉 再把https加上 神奇的事情出现了,这样就可以了. 很多人都说这样解决了,原因不知道. Administrator@BWE8QX ...

  7. 码云git clone报错Incorrect username or password ( access token )

    使用码云将仓库clone到本地,报错信息如下: D:\>git clone https://gitee.com/ycyzharry/helloworld.git Cloning into 'he ...

  8. git clone 报错Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

    在执行git clone命令报错 Unable to negotiate with xxx.xxx.xxx.xxx port 12345: no matching key exchange metho ...

  9. Git clone 报错 128

    使用tortoiseGit检出项目是报错,错误代码128: 使用git bash检出相同目录时返回 git clone fatal:destination path already exists an ...

随机推荐

  1. ORA-22992:没法使用从远程表选择的LOB定位器

    OLB 问题 ORA-22992:没法使用从远程表选择的LOB定位器 Create global temporary table temp on commit preserve rows as sel ...

  2. 2019Unite大会

    一年一度的Unite大会,在今年(2019)的5月10日准时在上海的国际会议中心盛大举行.本届大会历时三天,由来自全球的Unity公司技术专家.开发者.艺术家和Unity爱好者们齐聚一堂,展示Unit ...

  3. HDOJ1874最短路【spfa】

    //不知道切过这道题目几次了,这次又wa了...双向路啊....这波简直无奈了,今晚又是浪成狗!!!! #include<cstdio> #include<vector> #i ...

  4. OpenGL ES入门详解

     http://blog.csdn.net/wangyuchun_799/article/details/7736928 1.决定你要支持的OpenGL ES的版本.目前,OpenGL ES包含1.1 ...

  5. DataGridView Index -1 does not have a value 错误

    遇到一个非常奇怪的问题, 一个DataGridView在装载数据后, 无论点击Column还是Cell都会报如下错误: 查bing之后发现StackOverFlow都指向DataSource的问题. ...

  6. 2014-5-24 NOIP模拟赛

    Problem 1 护花(flower.cpp/c/pas) [题目描述] 约翰留下他的N(N<=100000)只奶牛上山采木.他离开的时候,她们像往常一样悠闲地在草场里吃草.可是,当他回来的时 ...

  7. Metabolic and gut microbial characterization of obesity-prone mice under high-fat diet (文献分享一组-赵容丽)

    题目:高脂饮食下易肥胖小鼠的代谢和肠道微生物特性研究 Metabolic and gut microbial characterization of obesity-prone mice under ...

  8. 第三章 “我要点爆”微信小程序云开发之点爆方式页面和爆炸之音页面制作

    点爆方式选择页面制作 在app.json中配置页面路径增加selectbao点爆方式选择,编译创建页面文件,点爆方式选择页面通过单选按钮组选择跳转到相应的点爆页面. <view class=&q ...

  9. Tinghua Data Mining 3

    特征选择 男女身高 男女抽烟 先验分布 熵 衡量系统的不确定性 属性的价值 降低了不确定性 降低的幅度越高越好 主成分分析 旋转是的数据间的correlation消失掉 Q是正交阵 七长八短,长宽相关 ...

  10. 洛谷1072(gcd的运用)

    已知正整数a0,a1,b0,b1,设某未知正整数x满足: 1. x 和 a0 的最大公约数是 a1​: 2. x 和 b0​ 的最小公倍数是b1. Hankson 的“逆问题”就是求出满足条件的正整数 ...