解决git clone时fatal: unable to access ‘https://gitee.com/XXX.git/‘: The requested returned error: 403

一、前言

我的电脑一直录入的是我的gitee账号,平常和同事协作开发,git pull、git clone等git操作都没有报错过。但是,今天要git clone另一个gitee账号的项目代码,出现报错403(如图1),我们一起来看看原因和解决办法。
在这里插入图片描述

二、原因分析及其解决办法

2-1、error:403常见原因

我在网上搜索了error:403的原因,最常见的是无权访问。

2-2、问题分析和解决

既然最常见的原因就是没有权限的问题,我的思路就是先从这个点着手。我立即在网上进行了问题搜索,得到了一些答案(但是没有解决我的问题),现在也展示给大家(说不定对你有用):
1、将路径中的https改为http
2、将git地址(https://gitee.com/XXX.git)改为(git://gitee.com/XXX.git)
上述两种方法我都尝试了,但是没用。我进行了问题分析:
第一个猜测就是本机录入的gitee账号和现在要进行clone的gitee账号不同导致的权限问题,我先用切换账号的方法,这是我之前的一篇文章(切换Git(Gitee)账号)账号成功切换但是没有解决问题。
第二个猜想就是更换本机录入的gitee账号和密码,成功解决了git clone 出现fatal: unable to access ‘https://github: The requested URL returned error: 403的问题,以下是更换步骤:
1、打开控制面板
在这里插入图片描述
我是Windows10的系统,直接输入打开即可,具体的打开控制面板的方式各位看官可以自行选择。
2、选择“用户账户”
在这里插入图片描述
3、选择“管理Windows凭据”
在这里插入图片描述
4、点击编辑更换账号密码
在这里插入图片描述
5、修改完后保存即可
在这里插入图片描述
到此,就可以继续正常执行git操作了。如果有报错,重启CMD终端窗口或者计算机在进行git操作。

三、说明

参考链接:
修改本地Git用户名、密码(转)
git clone 出现fatal: unable to access ‘https://github 类错误解决方法

欢迎大家一起讨论、学习

由于我在autodl租的服务器无法访问gitlab,我已经将eigen拉到了本地,如何使lietorch访问我本地的eigen文件夹,而不访问gitlab,报错如下:(mast3r-slam) root@autodl-container-cc3746a64c-4c1769bd:~/MASt3R-SLAM# pip install --no-build-isolation -e . Looking in indexes: http://mirrors.aliyun.com/pypi/simple Obtaining file:///root/MASt3R-SLAM Checking if build backend supports build_editable ... done Preparing editable metadata (pyproject.toml) ... done Collecting lietorch@ git+https://github.com/princeton-vl/lietorch.git (from MAST3R-SLAM==0.0.1) Cloning https://github.com/princeton-vl/lietorch.git to /tmp/pip-install-f0x_dt_2/lietorch_04351692bdf34ddb927c576984b5b361 Running command git clone --filter=blob:none --quiet https://github.com/princeton-vl/lietorch.git /tmp/pip-install-f0x_dt_2/lietorch_04351692bdf34ddb927c576984b5b361 Resolved https://github.com/princeton-vl/lietorch.git to commit 0fa9ce8ffca86d985eca9e189a99690d6f3d4df6 Running command git submodule update --init --recursive -q fatal: unable to access 'https://gitlab.com/libeigen/eigen.git/': The requested URL returned error: 503 fatal: clone of 'https://gitlab.com/libeigen/eigen.git' into submodule path '/tmp/pip-install-f0x_dt_2/lietorch_04351692bdf34ddb927c576984b5b361/eigen' failed Failed to clone 'eigen'. Retry scheduled fatal: unable to access 'https://gitlab.com/libeigen/eigen.git/': The requested URL returned error: 503 fatal: clone of 'https://gitlab.com/libeigen/eigen.git' into submodule path '/tmp/pip-install-f0x_dt_2/lietorch_04351692bdf34ddb927c576984b5b361/eigen' failed Failed to clone 'eigen' a second time, aborting error: subprocess-exited-with-error × git submodule update --init --recursive -q did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × git submodule update --init --recursive -q did not run successfully. │ exit code: 1 ╰─> See above for output.
最新发布
03-31
评论 13
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值