According to this link, I simply need to include the -S
switch to sign my commit using my GPG key, but I don't see how I can use that in Android Studio.
How do I sign my commits in Android Studio?
EDIT: I appreciate that OSX solutions are coming along, but I'd really like to see an answer that works with Windows. I only use my Mac for documents and stuff.
As I mentioned in "Sign git commits with GPG", with Git 2.0:
If you want to GPG sign all your commits, you have to add the -S option all the time.
Thecommit.gpgsign
config option allows to sign all commits automatically.
This doesn't fully work though, and is followed by issue 127802, with the following workarounds:
Created a helper script with that content:
/usr/bin/gpg –batch –no-tty "$@"
and set
gpg.program
to that script
Or:
Adding "
no-tty
" to "~/.gnupg/gpg.conf
" solved the problem for me.
You might still get the error message:
Commit failed with error: gpg: problem with the agent - disabling agent use gpg: Sorry, no terminal at all requested - can't get input error: gpg failed to sign the data fatal: failed to write commit object
Again: bug in progress, also followed by issue 110261:
resolve it with this in addition to the previous solution (OS X):
1)
brew install gnupg gnupg2 pinentry-mac
2)
nano ~/.gnupg/gpg-agent.conf
->pinentry-program /usr/local/bin/pinentry-mac
3)
git config -–global gpg.program gpg2
After make some test I follow this steps and it works Please remember to restart the Android Studio after follow this steps:
Are you tired off write the password for each commit???
Follow the link: https://github.com/pstadler/keybase-gpg-github
after that edit the gpg.conf
nano ~/.gnupg/gpg.conf
use-agent no-tty default-key <your key id>
ln -s /usr/local/Cellar/libgcrypt/1.7.0_1 /usr/local/opt/libgcrypt
ln -s /usr/local/Cellar/libgpg-error/1.22 /usr/local/opt/libgpg-error
ln -s /usr/local/Cellar/libassuan/2.4.2 /usr/local/opt/libassuan
ln -s /usr/local/Cellar/pth/2.0.7 /usr/local/opt/pth
source ~/.profile
git commit -am "my commit message" -S
Thats it!!!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With