解决:The requested URL returned error: 403

简介: 今天在 arm 架构的服务器上创建工程时,遇到了一个报错,执行的命令如下:git clone git.liuzhen007.com/boffmpeg.gi…报错信息如下:fatal: unable to access 'git.liuzhen007.com/boffmpeg.gi…': The requested URL returned error: 403

目录

问题

解决

方法一

方法二


问题

今天在 arm 架构的服务器上创建工程时,遇到了一个报错,执行的命令如下:

git clone git.liuzhen007.com/boffmpeg.gi…

报错信息如下:

fatal: unable to access 'git.liuzhen007.com/boffmpeg.gi…': The requested URL returned error: 403

报错截图:

网络异常,图片无法展示
|

解决

方法一

执行如下命令查看 git 配置信息:

git config --list

发现 user.name 和 user.email 配置的用户名和邮箱不正确,然后执行如下命令进行了修改:

git config --global user.name "用户名"

git config --global user.email "邮箱"

再次查看 git 配置信息,发现已经更正,如下图所示:

网络异常,图片无法展示
|

再次执行 clone 命令,报错依然存在。

方法二

基本上尝试了所有的方法,都没有解决上述问题,最终使用如下命令解决了问题:

git clone git@git.liuzhen007.com:boffmpeg.git

其实,我们在使用 github 或者 gitlab 创建工程时,一般有两种方式, github 更多时候只有一种。我们这里只是替换了一种 clone 代码的方式,上述问题应该还是和 git 配置有关系,但是时间比较紧,就先不深入追究了,知道的小伙伴欢迎评论留言!



作者简介:大家好,我是 Data-Mining(liuzhen007),是一位典型的音视频技术爱好者,同时也是CSDN博客专家、华为云享专家(共创编辑)、InfoQ 签约作者,公众号:玩转音视频,欢迎关注我分享更多干货!

目录
相关文章
|
5月前
|
机器学习/深度学习 前端开发 JavaScript
源映射错误:Error: request failed with status 404 源 URL:http://localhost:8080/bootstrap/js/axios-0.18.0.js
源映射错误:Error: request failed with status 404 源 URL:http://localhost:8080/bootstrap/js/axios-0.18.0.js
120 0
源映射错误:Error: request failed with status 404 源 URL:http://localhost:8080/bootstrap/js/axios-0.18.0.js
|
2月前
optional install error: Error: Unsupported URL Type: npm:vue-loader@^16.1.0
optional install error: Error: Unsupported URL Type: npm:vue-loader@^16.1.0
34 3
|
3月前
The requested URL could not be retrieved
The requested URL could not be retrieved
41 1
|
2月前
|
存储 开发工具 数据安全/隐私保护
解决Gitee或者Github出现Access denied fatal: unable to access,The requested URL returned error: 403
解决Gitee或者Github出现Access denied fatal: unable to access,The requested URL returned error: 403
187 0
|
3月前
|
前端开发 安全 测试技术
【Python】已解决:The method is not allowed for the requested URL.
【Python】已解决:The method is not allowed for the requested URL.
108 3
|
4月前
Error: Cannot find module ‘node:url‘【已解决】
Error: Cannot find module ‘node:url‘【已解决】
141 3
|
12月前
|
Java 关系型数据库 MySQL
create connection error, url: jdbc:mysql://localhost:3306/ssm, errorCode 1045, state 28000 java.sql.
create connection error, url: jdbc:mysql://localhost:3306/ssm, errorCode 1045, state 28000 java.sql.
145 0
|
5月前
|
开发工具 git
Git上传出现:The requested URL returned error: 403解决办法
Git上传出现:The requested URL returned error: 403解决办法
221 0
|
11月前
cnpm i安装报错-Install fail! Error: Unsupported URL Type: npm:vue-loader@^15.9.7
cnpm i安装报错-Install fail! Error: Unsupported URL Type: npm:vue-loader@^15.9.7
431 1
|
5月前
|
Web App开发 人工智能 测试技术
软件测试/人工智能|解决Selenium中的异常问题:“error sending request for url”
软件测试/人工智能|解决Selenium中的异常问题:“error sending request for url”
279 0