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

错误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. Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.

    一.前言 Job for mysqld.service failed because the control process exited with error code. See "sys ...

  2. visualstudio Team Foundation Server 使用教程

    一.前沿 Team Foundation Server 是我们开发者使用最多的源代码管理工具.由于自己服务器搭建拉取工作慢的缘故,我使用了微软的 TFS.使用非常方便.快捷.免费.且不公开私有的项目. ...

  3. Mac Apache

    参考文章1 当前系统版本:Mac OS 10.11.6 一.使用 homebrew 安装 apache 停止系统自带的 apache 服务 $ sudo apachectl stop 卸载系统自带的 ...

  4. hexo添加新菜单并实现新菜单的文章归类

    1.添加收藏夹菜单,新建一个页面,命名为 favorite,命令如下: hexo new page favorite ## 然后就可以看到在source下多了一个favorite的文件夹,里面有一个i ...

  5. lightoj 1089 【离散化+线段树】

    题意: 给你n个区间,然后给你m个i点问你这个点在几个所给定的区间里: 思路: 离散化+区间覆盖 #include <bits/stdc++.h> using namespace std; ...

  6. IT兄弟连 JavaWeb教程 JSP静态包含和动态包含的区别

    JSP静态包含(<%@ include>和JSP动态包含<jsp:include>同样都可以用来包含文件,但是他们之间是存在很大差别的.下面将对include指令与includ ...

  7. mysql 配置大小写敏感后不能重启

    [问题现象] 在mysql的配置文件my.cnf配置lower_case_table_names=1后不能重启mysql,提示mysql.serviceJob for mysql.service fa ...

  8. MongoDB 删除数据

    删除mongodb集合中的数据可以使用remove()函数.remove()函数可以接受一个查询文档作为可选参数来有选择性的删除符合条件的文档.remove()函数不会删除集合本身,同时,原有的索引也 ...

  9. Tinghua Data Mining 6

    Networks 多层感知机 不是说这个神经网络要与人的大脑神经完全相似,也不是说要多么的强大,而是在一定程度上模拟了人脑神经元的能力,就足够了 为什么要w0呢,因为没有w0超平面一定会经过原点,所以 ...

  10. [在读]web前端黑客技术揭秘