继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

git使用push提交到远程仓库出现 The requested URL returned error: 403 错误

慕码人8056858
关注TA
已关注
手记 1092
粉丝 350
获赞 1320

摘要:记录了使用push提交到远程仓库出现 The requested URL returned error: 403 错误的解决方法。

问题描述

  • 电脑已经注册过一个github帐号,一直在本机使用,配置过SSH。

  • 今天新建了一个github帐号,本地建立好项目之后,使用命令:$ git push -u origin master时出现以下错误

remote: Permission to userName/repositorieName.git denied to clxering.
fatal: unable to access 'https://github.com/userName/repositorieName.git/': The requested URL returned error: 403

问题原因

问题主要出在原注册账号上,系统保存了账号的信息。在使用新帐号时,信息不一致,所以报错。

解决方案

  • 打开cmd,输入命令:rundll32.exe keymgr.dll,KRShowKeyMgr,出现存储的用户名和密码窗口

  • 将github相关的条目删除

  • 重新执行命令:$ git push -u origin master,提示输入账户名及密码后,成功。

Counting objects: 9, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (9/9), 716 bytes | 716.00 KiB/s, done.
Total 9 (delta 0), reused 6 (delta 0)
To https://github.com/userName/repositorieName.git
 * [new branch]      master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.



作者:MrDcheng
链接:https://www.jianshu.com/p/efe99888331c


打开App,阅读手记
3人推荐
发表评论
随时随地看视频慕课网APP

热门评论

简单好用,大佬牛逼

牛批大佬,简单实用

查看全部评论