Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Cannot commit with GPG sign

I've done all steps here:
But when I try to commit, not successfully:

git commit -S -m your commit message

 An error occurs:
$ git commit -S -m "Test"
error: cannot spawn C:\Users\abc\.gnupg: Permission denied
error: gpg failed to sign the data
fatal: failed to write commit object

1 answer

0 votes

That suggests that the current user does not have full read/write/execute/delete access to the files in the abc direcotory (possibly because of a lack of access to the directory itself)

Check the permissions first.  If you find they look ok, then the next test would be to try to edit the .gnupg file with another application (a text editor probably) as that may tell you more about why it can't access the file.

I am able to delete/edit folder/files but Source tree cannot access.
Config file look like that:

         signingkey = xxxxxxxxxxxxxxxxxxxxxxxxx
         gpgsign = true
         program = C:\\Users\\abc\\.gnupg

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

5,768 views 4 12
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you