-
Notifications
You must be signed in to change notification settings - Fork 855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WSL Ubuntu: git gpg signing Inappropriate ioctl for device #4029
Comments
Needs more steps before the one liner (setting up gpg keys) and the strace log needs to be threaded (
|
@therealkenc As I wrote above, the strace was done with You need to generate a key pair before you can encrypt/sign anything. See this guide: https://help.github.com/en/articles/managing-commit-signature-verification Specifically this part: https://help.github.com/en/articles/generating-a-new-gpg-key |
Apologies it was late when I wrote that, and I wasn't very clear at all. You did the
Yes, I know how to create |
@therealkenc Thanks for the info. But these leaves me with 2 unsolved issues.
How do you propose I move this issue forward? The error message Inappropriate ioctl for device is a general message, that appears in searches for a lot of Ubuntu Bash for Windows (UBW) issues. That makes me think that it's describing a general missing feature in UBW, alike to Not implemented, which makes me think that
would easily be able to pin point the missing feature. From strace:
|
Ahh wait.. I know what is wrong.
And here you have it: dotnetCarpenter/FLjs@b0a3528, my first verified commit on Ubuntu Bash on Windows done via So the question is now; do I configure gpg with I have been using Ubuntu and Mint for years without ever having this issue. So it seems that UBW is missing a standard setup that has been implemented in Ubuntu for years. |
From the strace I get:
Perhaps setting something alike to |
Dunno. WSL just kind of does what it is told at the syscall level, modulo bugs. Tagging this question, at least for now, because there doesn't seem to be an actionable diverge. [That's not a bad thing.] That |
Well for now I get around it with the following in my .bashrc: # enable passphrase prompt for gpg
export GPG_TTY=$(tty) |
this doesn't work in zsh either |
@woss |
Follow the below url to setup signed commit https://help.github.com/en/articles/telling-git-about-your-signing-key if still getting gpg failed to sign the data fatal: failed to write commit object this is not issue with git ,this is with GPG follow below steps
if it is showing:
Output:
Output:
|
Hello future travelers, I'm actually still having this issue. Yes, adding the How would I tell GPG to ask for my password using a gui instead of via the terminal? Because having to type |
Just to close the loop: |
Did you find a solution @bdotsamir? |
Unfortunately I did not, @georglauterbach. Shortly after posting that comment, I received a macbook pro as a gift, thus solving my issue of having to use WSL at all. Sorry 😭 |
I see :) Against all odds, I figured out that my problem was the |
Your Windows build number: (Type
ver
at a Windows Command Prompt)Microsoft Windows [Version 10.0.17763.1]
What you're doing and what's happening:
Signing git commits with gpg is failing with:
error: gpg failed to sign the data
fatal: failed to write commit object
gpg --list-secret-keys --keyid-format LONG
git config -l
Quick repro
echo "test" | gpg --clearsign
gpg --version
What's wrong / what should be happening instead:
git should sign my commit with my key.
Strace of the failing command:
echo "test" | strace -o gpg.strace -f gpg --clearsign
gpg.strace
git --version
:git version 2.17.1
The text was updated successfully, but these errors were encountered: