美文网首页码农的世界程序员IT@程序员猿媛
git 使用 push 提交到远程仓库出现 The reques

git 使用 push 提交到远程仓库出现 The reques

作者: MrDcheng | 来源:发表于2019-03-23 07:54 被阅读7次

摘要:记录了使用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

问题原因

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

解决方案

  1. 打开cmd,输入命令:rundll32.exe keymgr.dll,KRShowKeyMgr,出现系统存储的用户名和密码窗口;
  2. 将 github 相关的条目删除;
  3. 重新执行命令:$ 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'.

相关文章

  • git 使用 push 提交到远程仓库出现 The reques

    摘要:记录了使用push提交到远程仓库出现 The requested URL returned error: 4...

  • Git命令

    git push 作用:将本地仓库中代码提交到远程仓库 语法 :git push 仓库地址 master git ...

  • [git]使用push提交到远程仓库出现 The request

    摘要:使用push提交到远程仓库出现 The requested URL returned error: 403 ...

  • Git常用命令笔记

    git命令使用 1 创建远程仓库(初始化--提交到本地仓库--提交到远程仓库) $ git init ...

  • 2018-05-14

    删除远程分支: git push 远程仓库 --delete 远程分支 git push 远程仓库:远程分支 本地...

  • git版本回退

    本地回退 如果没有通过 git push 提交到远程。 远程回退 如果通过 git push 提交到远程,则需要,...

  • git问题(1)

    1.将项目使用git提交到远程仓库出现的错误 原因:没有同步远程的master 解决:同步远程master...

  • git push

    使用git push,根据远程仓库和本地仓库的属性不同,主要分为以下几种情况。 要是本地仓库比远程仓库提前,使用g...

  • 访问远程git仓错误

    在使用git pull/push 访问远程仓库时提示:Unable to negotiate with 128.1...

  • 【Git】push代码的时候报错: ! [rejected]

    使用命令git push origin master 报如下错误: 出现这种情况的原因是git远程仓库中已经有一部...

网友评论

    本文标题:git 使用 push 提交到远程仓库出现 The reques

    本文链接:https://www.haomeiwen.com/subject/pbdjvqtx.html