【问题标题】:Unable to push repository to Github [duplicate]无法将存储库推送到 Github [重复]
【发布时间】:2021-09-28 23:31:44
【问题描述】:

我正在尝试将一些代码推送到我的 Github 存储库。 我在 Github 上有一个基础存储库,我在 IntelliJ 上提取了它。进行更改后,我试图将其推回 Github。但是,我不断收到以下错误: 远程:对 xxxxxx.git 的权限拒绝 xxxxxx。 致命:无法访问'https://github.com/xxxxxx/xxxxxx.git/':请求的URL返回错误:403 我是 Github 和 IntelliJ 的新手,我不知道自己做错了什么。

我什至尝试从终端推送存储库。但是,得到了同样的错误

λ git push 信息:请在您的浏览器中完成身份验证... 远程:springframeworkguru/spring5webapp.git 的权限被拒绝为 mohitagwl。 致命:无法访问'https://github.com/springframeworkguru/spring5webapp.git/':请求的URL返回错误:403

【问题讨论】:

标签: java github intellij-15


【解决方案1】:

原来我的存储库是从其他人的存储库中分叉的。因此,我不得不更改我的仓库的所有者以允许 git push。

最初:

λ git remote -v 来源https://github.com/notMyRepo/app.git(获取) 来源https://github.com/notMyRepo/app.git(推)

我将其更改为: λ git remote set-url origin https://github.com/myRepo/app

【讨论】:

    猜你喜欢
    • 2021-09-09
    • 2021-11-27
    • 2012-08-25
    • 2011-12-09
    • 2019-06-18
    • 2017-08-22
    • 2021-09-11
    • 2014-03-15
    • 2018-05-02
    相关资源
    最近更新 更多