git问题:push的时候报错remote: Permission to xxx/xxx.git denied to xxx.
Git 报错 to 时候 xxx PUSH Remote denied
2023-09-27 14:27:10 时间
问题描述
当你在命令行push一个项目的时候git push -u origin master
出现此报错
remote: Permission to <新的github名/项目名.git> denied to <旧的github名>.
fatal: unable to access 'https://github.com/<新的github名/项目名.git>/': The requested URL returned error: 403
问题原因
我们来大致的翻译一下这个错误:用户<旧的github名>没有权限访问用户<新的github名>的存储库<项目名>。
也就是说:现在电脑登录的是用户<旧的github名>,我们需要切换到用户<新的github名>。
so,怎么切换账号呢,看我操作⤵️
解决方法
1、mac版解决方法
cmd+space
搜索钥匙串访问
- 继续
然后右键这个github.com,会出现显示简介,点开,你就可以看到,现在显示的是你的老账号密码,你只需要修改为你的新的账号密码就ok啦~
2、windows版解决方法
- 同样的,编辑为你的新账号
最后
git push origin master
,不成功你来砍我
相关文章
- Git 进阶指南
- 常用Git命令大全思维导图
- git报错:index.lock File exists
- Git远程仓库地址变更本地如何修改
- git远程地址替换
- git报错:Auto Merge Failed; Fix Conflicts and Then Commit
- Git报错-refusing to merge unrelated histories
- learn git(远程仓库github)
- Git 强制回退到某个历史版本再推送到远程
- git报错warning: LF will be replaced by CRLF
- QMUI android 框架 git下载项目运行报错解决 input String“”
- git拉取GitLab工程报错Repository not found
- 【VSCode】vscode中配置默认终端为git-bash
- [Git] git commit调用模板描述本次提交内容
- pip install -q git+https://github.com/tensorflow/docs.git报错
- Git复习(十)之常见报错和疑问
- 【git学习五】git基础之git分支
- Git安装与使用(windows环境)(一)----Git安装、生成公钥和私钥、添加SSH
- git clone 报错 “ gnutls_handshake() failed: The TLS connection was non-properly terminated.”
- git报错“error launching git”
- Git常用操作命令(查看、创建、切换、删除分支)
- 【错误记录】git clone 报错 ( fatal: unable to access ‘https...‘:gnutls_handshake() failed: Error in the pu )
- 【错误记录】Git 使用报错 ( git branch -a 仍能查询到已经删除的远程分支 )
- 【错误记录】Git 使用报错 ( git: ‘switch‘ is not a git command. See ‘git --help‘. )
- at_today git--一文弄懂git的工作区、索引区、本地仓库、远程仓库以及add、commit、push三个操作
- git 删除远程分支报错error: unable to delete ‘origin/xxx‘: remote ref does not exist
- git 报错:Support for password authentication was removed. Please use a personal access token instead.
- git镜像仓库
- Git 实用指南
- 一种优雅的Git分支实践
- git commit提交规范和规范校验
- Git 工具 - 子模块