gpt4 book ai didi

git - 远程 : Forbidden fatal: unable to access

转载 作者:行者123 更新时间:2023-12-04 17:35:28 26 4
gpt4 key购买 nike

我可以访问 repo,我通过 https 克隆它,然后我进行了更改并提交了这些更改并创建了 new_branch并尝试 push 我得到了这个:

git push origin new_branch
remote: Forbidden
fatal: unable to access 'https://username@bitbucket.org/main-account/repo.git/': The requested URL returned error: 403

我已经设置了我的 SSH key ,git global config 并且已经登录
ssh -T username@bitbucket.org
logged in as username

You can use git or hg to connect to Bitbucket. Shell access is disabled

另外,我尝试更改网址
git remote set-url origin git@bitbucket.org:main-account/repo.git

当我 push 时,我得到了这个
git push origin new_branch
Forbidden
fatal: Could not read from remote repository.

Please make sure you have the correct access rights

最后是我的 ~/.ssh/config
Host *
UseKeychain yes

Host bitbucket.org
HostName bitbucket.org
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa

有什么帮助吗?
提前致谢

最佳答案

确保 usernamemain-account是一样的:您需要推回您拥有的存储库(已创建为用户名)

或者您需要been granted repository accessusername由他们的主人 main-account .

关于git - 远程 : Forbidden fatal: unable to access,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56811607/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com