解决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

出现场景

pull

从github或者gitee码云拉取其他人的私有项目时,报以下错误

git clone https://gitee.com/hybird_now/ali_app.git
Cloning into 'ali_app'...
remote: [session-20433bf4] Access denied
fatal: unable to access 'https://gitee.com/hybird_now/ali_app.git/': The requested URL returned error: 403

push

要把某个项目push到Gitee码云或者Github上,已经设置了仓库地址,在最后一步推送代码时直接报错。

adodeMacBook-Pro:yimabao ado$ git push --set-upstream origin master
remote: [session-774b45b9] Access denied
fatal: unable to access 'https://gitee.com/mzmilk/yimabao.git/': The requested URL returned error: 403

问题分析

因为报的错是没有访问权限,只要本地使用过Github或者Gitee等git服务,电脑上就会存储git的账号和密码凭据.这样下次pull或者push的时候就会默认

我们只要删除本地账号或者把git的账号和密码修改成远程仓库有访问权限的账号即可。

解决方案

Windows

Mac

打开钥匙串,种类选择所有项目,在右边搜索git。

找到github或者gitee,删除对应的项目即可。

删除

右键,点击删除"gitee.com"

弹出窗口,选择删除。

修改

双击gitee条目后,弹出以下窗口。

修改账户, 勾选显示密码,输入电脑密码,然后就能更改密码了。

最后点击存储更改就修改完成了。


再重新pull或者push,会提示输入密码和账号,输入正确的就能正常pull、push了。

adodeMacBook-Pro:yimabao ado$ git push --set-upstream origin master
Username for 'https://gitee.com': xxxxxx@qq.com
Password for 'https://xxxxxx@qq.com@gitee.com':
Enumerating objects: 158, done.
Counting objects: 100% (158/158), done.
Delta compression using up to 4 threads
Compressing objects: 100% (136/136), done.
Writing objects: 100% (158/158), 268.65 KiB | 5.97 MiB/s, done.
Total 158 (delta 25), reused 0 (delta 0)
remote: Resolving deltas: 100% (25/25), done.
remote: Powered by GITEE.COM [GNK-6.4]
To https://gitee.com/mzmilk/yimabao.git
 * [new branch]      master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.

 

相关文章
|
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” 的报错。这个问题通常是由网络连接问题或代理设置不正确导致的。在我的个人使用经验中,我亲自尝试了四种方法,它们都能够有效地解决这个报错。个人比较推荐方法二。
1624 0
|
3月前
|
Linux 网络安全 开发工具
在Linux下配置gitee与Github的远程仓库
注意,git push后,是输入你的账号与密码。这个步骤可以通过特殊设置省去,但是一开始还是不要太省。
154 0
|
8月前
|
开发工具 git
如何操作github,gitee,gitcode三个git平台建立镜像仓库机制,这样便于维护项目只需要维护一个平台仓库地址的即可-优雅草央千澈
如何操作github,gitee,gitcode三个git平台建立镜像仓库机制,这样便于维护项目只需要维护一个平台仓库地址的即可-优雅草央千澈
439 69
如何操作github,gitee,gitcode三个git平台建立镜像仓库机制,这样便于维护项目只需要维护一个平台仓库地址的即可-优雅草央千澈
|
8月前
|
Devops Shell 网络安全
git使用之如何将一套代码同时推送至github|gitee|gitcode|gitlab等多个仓库-含添加ssh-优雅草央千澈完美解决-提供整体提交代码
git使用之如何将一套代码同时推送至github|gitee|gitcode|gitlab等多个仓库-含添加ssh-优雅草央千澈完美解决-提供整体提交代码
323 16
git使用之如何将一套代码同时推送至github|gitee|gitcode|gitlab等多个仓库-含添加ssh-优雅草央千澈完美解决-提供整体提交代码
|
10月前
|
网络安全 开发工具 git
解决fatal:remote error:You can’t push to git://github.com/username/*.g
通过上述诊断与修复步骤,绝大多数的推送错误都能得到有效解决,确保您的Git工作流顺畅无阻。
496 1
|
开发工具 git
GitHub——Error: Process completed with exit code 126.
GitHub——Error: Process completed with exit code 126.
271 1
GitHub——Error: Process completed with exit code 126.
|
12月前
|
Shell 网络安全 开发工具
Git,GitHub,Gitee&IDEA集成Git
Git提交项目到GitHub简洁版、版本控制、安装、常用命令、分支、团队协作机制、Github、Gitee远程仓库、IDEA集成Git、IDEA集成Github、IDEA集成Gitee
Git,GitHub,Gitee&IDEA集成Git
|
11月前
|
Unix Shell 网络安全
git学习六:(bug总结)git@github.com: Permission denied (publickey).等
本文是关于解决在使用Git和GitHub时遇到的“git@github.com: Permission denied (publickey)”错误的指南。文章提供了详细的步骤,包括确认SSH Agent运行状态、检查密钥配置、确保密钥匹配、验证仓库URL、检查权限和代理设置,以及配置SSH文件。这些步骤帮助用户诊断并解决SSH认证问题。
1518 0
|
12月前
|
Shell 网络安全 开发工具
fatal: unable to access 'https://github.com/wolfcw/libfaketime.git/': Encountered end of file
fatal: unable to access 'https://github.com/wolfcw/libfaketime.git/': Encountered end of file
|
1月前
|
JSON Kubernetes 安全
找到啦,我们已上车,Github 27000+ star,研发团队必备开源工具项目,真丝滑!!!
Trivy 是一款高效灵活的开源安全扫描工具,支持容器镜像、文件系统、Kubernetes 等多目标扫描,具备快速、易用、集成性强等特点,适用于 DevSecOps 全流程安全检测。

热门文章

最新文章