SourceTree commits fail when using Git signed commits

お困りですか?

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

コミュニティに質問

問題

SourceTree is not able to commit a change due to the impossibility to sign it.

The following appears in the SourceTree user interface.

gpg: cannot open `/dev/tty': Device not configured

error: gpg failed to sign the data
fatal: failed to write commit object

As shown on the following screenshot.

診断

Diagnostic Steps

  • Check the git command in the SourceTree user interface
  • The git command does not contain any neither the --gpg.program nor the --gpg-sign command line option

原因

This error occurs when the System Git or the repository has been configured outside of SourceTree to sign all commits, but SourceTree isn't. In this circumstance SourceTree just invokes the System Git instance which attempts to open a dialog with the user. However this is impossible when running within SourceTree.

ソリューション

Setup GPG to sign commits within SourceTree so that the Git commit command line options are added by SourceTree when performing a commit.

Last modified on Mar 30, 2016

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

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