Git credential-store error when saving a Bitbucket Cloud repository

お困りですか?

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

コミュニティに質問

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

この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

要約

When trying to link with a Bitbucket cloud repository in Bamboo and choosing the authentication type as Username and Password, a git credential-store error is displayed in the page:

環境

診断

To get more details of the error in the <BAMBOO-HOME>/logs/atlassian-bamboo.log, you can enable debug logging for the com.atlassian.bamboo.plugins.git class with type ALL.

When looking at the atlassian-bamboo.log, you'll see that the command and path used by Bamboo to authenticate against the Bitbucket Cloud repository has a blank space in the temp folder path.

Windows
DEBUG [https-openssl-nio-8443-exec-8 url: /rest/api/latest/repository/testConnection; user: admin] [GitCommandProcessor] Running in D:\Program Files\Bamboo\temp: ['D:\Program Files\Git\cmd\git.exe' -c credential.helper= -c 'credential.helper=store --file=D:/Program Files/Bamboo/temp/gitCredentials7503534358303087327.tmp' ls-remote https://admin@bitbucket.org/admin/REPO]
Linux
DEBUG [10-BAM::PlanExec:pool-13-thread-4] [GitCommandProcessor] Running in /opt/atlassian/bamboo versions/temp: [/usr/bin/git -c credential.helper= -c 'credential.helper=store --file=/opt/atlassian/bamboo versions/temp/gitCredentials8447275709693639222.tmp' ls-remote https://admin@bitbucket.org/admin/REPO]

原因

When saving a Bitbucket Cloud repository, Bamboo captures the user and password (app password) provided, storing them in the gitCredentials***.tmp file for authentication purposes. If there's a space in the <BAMBOO_INSTALL>/temp folder path, Bamboo fails to parse the user and password stored in the gitCredentials***.tmp folder, resulting in a git credentials store error message.

ソリューション

Windows

Incorporating a short name for 'Program Files' on Windows

On Windows, it's possible to have a short name without spaces for the Program Files folder:

  1. Open the command line and navigate to the drive where Bamboo is located.
  2. Execute the following command to detect any existing short names.

    dir /x
  3. If 'Program Files' doesn't have a short name, use the next command to create one.

    fsutil file setshortname "D:\Program Files" PROGRA~1
  4. Re-run the dir /x command to verify that the short name was successfully created.

If needed, when running Bamboo as a Service, if the issue persists, make the following changes:

  1. Open CMD and move to the <BAMBOO-INSTALL>/bin directory.
  2. Type Bamboow.exe //ES//Bamboo and hit enter.
  3. Go to the Java tab and adjust the bamboo install folder Path to PROGRA~1
  4. Restart Bamboo and monitor its performance.

Linux

Remove any blank space within the <BAMBOO_INSTALL>/temp folder path. For example, rename /opt/atlassian/bamboo versions/temp  to /opt/atlassian/bamboo_versions/temp.

最終更新日 2024 年 4 月 1 日

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

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