error: gpg failed to sign the data
I am seeing this when trying challenge-0-simple-nft challenge-0-simple-nft
ligi@ligi-tp ~/t/ocd> npx [email protected] -e challenge-0-simple-nft challenge-0-simple-nft
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Create Scaffold-ETH 2 app |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
✔ 📁 Create project directory /home/ligi/tmp/ocd/challenge-0-simple-nft
✔ 🚀 Creating a new Scaffold-ETH 2 app in challenge-0-simple-nft with the scaffold-eth/se-2-challenges:challenge-0-simple-nft
extension
✔ 📦 Installing dependencies with yarn, this could take a while
✔ 🪄 Formatting files
✖ Failed to initialize git repository
ERROR Error occurred Error: Failed to initialize git repository
at createFirstGitCommit (file:///home/ligi/.npm/_npx/ef1264485657bf6a/node_modules/create-eth/dist/cli.js:621:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Task.run (file:///home/ligi/.npm/_npx/ef1264485657bf6a/node_modules/listr2/dist/index.js:2058:11) {
[cause]: 'error: gpg failed to sign the data:\n' +
'[GNUPG:] KEY_CONSIDERED 9E3F59F72C5225B2C2B73A918E81894010ABF23D 2\n' +
'[GNUPG:] BEGIN_SIGNING H10\n' +
'[GNUPG:] PINENTRY_LAUNCHED 13130 gnome3 1.2.1 - xterm-256color :1 - 1000/1000 -\n' +
'gpg: signing failed: Operation cancelled\n' +
'[GNUPG:] FAILURE sign 83886179\n' +
'gpg: signing failed: Operation cancelled\n' +
'\n' +
'fatal: failed to write commit object'
}
Uh oh! 😕 Sorry about that! Exiting...
Hey Ligi! Thanks for reporting
It seems like the issue is related to your git setup.
Could you try doing the usual git workflow in a test folder? git init, git add -A, git commit -m "test" and see if it works?
yes - this works perfectly - I use git every day But I used signed commits - guess this is the complication that breaks things here?
https://github.com/scaffold-eth/create-eth/blob/main/src/tasks/create-first-git-commit.ts
These are the commands being executed. Could you try these CDing into thechallenge-0-simple-nft folder?
when I executing the commit on the CLI it works fine. It asks my gpg password in the process - guess this is what fails here.
I can workaround it by doing:
[commit]
gpgsign = false
in my gitconfig.
But it feels a bit bad. Maybe a git config --local commit.gpgsign false in create-first-git-commit.ts could remove this stone and not having much damage in the process?