Git returns "Insufficient permissions" even after an SSH key has been added

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

問題

When pushing to a repository, the following is returned on the command line, even though SSH keys have been added to the repository or the user's profile, with write access:

fatal: remote error: Insufficient permissions 
You cannot push to <branch-name>. Pushing requires write access and your access is read-only. 
fatal: Could not read from remote repository.

診断

Diagnostic Steps

Ensure an SSH key has been added for the user or the repository, with write access: 


Attempt to push a change to the repository: 

原因

The user likely has another SSH key somewhere on the filesystem, that is different from the one added to Bitbucket Server.

ソリューション

  • Check the ~/.ssh/config file for a path to another SSH public key
  • Add this key in place of the one currently added to the repository or the profile

Last modified on Mar 1, 2022

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.