question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SSH signing doesn't work

See original GitHub issue

The problem

I have an SSH key tied to my Git configuration. This key works fine when I do a git commit -S -m through Git Bash, but when I do it through GitHub Desktop, I get the following error:

error: Load key “C:\Users\[username]\AppData\Local\Temp/.git_signing_key_tmp[changing string]”: invalid format? fatal: failed to write commit object

Release version

3.0.8

Operating system

Windows 10

Steps to reproduce the behavior

  1. Add an SSH key for signing as shown in this GitHub guide
  2. Try doing a commit with GitHub Desktop

Log files

2022-09-16.desktop.production.log 2022-09-17.desktop.production.log

Screenshots

error macerror

Additional context

On my Mac, I don’t get an error when I use my SSH key there. UPDATE 20/09/22: Doesn’t work on a Mac either!

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jblskcommented, Nov 18, 2022

I have the same behaviour on MacOs Ventura in terminal. Clearly, the path in error message is constructed wrong, as there is duplicated slash after the TMPDIR env. variable:

% git commit -S --amend                                   
error: Load key "/var/folders/x0/2d98rx897cnfgb1q9chxfq4c0000gp/T//.git_signing_key_tmpnM7iuw": invalid format?

fatal: failed to write commit object
% echo error: Load key '"'$TMPDIR
error: Load key "/var/folders/x0/2d98rx897cnfgb1q9chxfq4c0000gp/T/

The key itself is in place:

% ls -a $TMPDIR | grep .git_signing_key_tmpnM7iuw 
.git_signing_key_tmpnM7iuw

but the path to it it the error message on top is wrong.

1reaction
applecuckoocommented, Sep 20, 2022

Alright, filed a bug on the Git mailing list (linked here) about this bug.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Troubleshoot SSH Authentication Issues
Problems with SSH authentication includes permission denied with SSH keys and passwords.
Read more >
How to solve "sign_and_send_pubkey: signing failed: agent ...
Run ssh -add on the client machine, that will add the SSH key to the agent. Confirm with ssh-add -l (again on the...
Read more >
Code signing fails trough ssh | Apple Developer Forums
The xcodebuild does work if I don't use ssh. But when I use ssh it fails: No signing certificate "iOS Development" found: No...
Read more >
It's Now Possible To Sign Arbitrary Data With Your SSH Keys
SSH has optional lightweight certificates. You don't have to use SSH certificates (and most people shouldn't) but if certificates would make ...
Read more >
SSH - Key signing of ED25519 style keys does not work
Please run ssh with the "-vv" flag to print debugging output. Then edit your question to include the ssh command that you ran...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found