eficode-academy / git-katas

A set of exercises for deliberate Git Practice
MIT License
1.32k stars 860 forks source link

Disable GPG signing of commits locally during setup #276

Closed dangrondahl closed 4 years ago

dangrondahl commented 4 years ago

As signing might be enabled globally, commits from setup scripts local user should happen without signing.

This caused setup commits not to happen, See example below.

Before

~/git-katas/basic-staging source setup.sh 
Initialized empty Git repository in ~/git-katas/basic-staging/exercise/.git/
Successfully configured local username and email
error: gpg failed to sign the data
fatal: failed to write commit object
Successfully unset local username and email

After

~/git-katas/basic-staging source setup.sh
Initialized empty Git repository in ~/git-katas/basic-staging/exercise/.git/ 
Successfully configured local username and email
Successfully disable local GPG signing
[master (root-commit) 909a0d0] 1
 1 file changed, 1 insertion(+)
 create mode 100644 file.txt
Successfully unset local username and email
Successfully unset local GPG signing
RandomSort commented 4 years ago

Thank you for your contribution 👍