Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Signed commit error (macOS): illegal option -- Y

Christian Roth
December 2, 2025

Hello,

I tried my first commit from within SourceTree (4.2.11 (427)). I'm on macOS 15.7.2.

I get the following error:

git --no-optional-locks -c color.branch=false -c color.diff=false -c color.status=false -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree add -f -- test-cr.txt


git --no-optional-locks -c color.branch=false -c color.diff=false -c color.status=false -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree commit -q -F /var/folders/[…]/SourceTreeTemp.3tjuuq -a
error: ssh-keygen -Y sign is needed for ssh signing (available in openssh version 8.2p1+)
error: /usr/bin/ssh-agent: illegal option -- Y
usage: ssh-agent [-c | -s] [-Dd] [-a bind_address] [-E fingerprint_hash]
[-O option] [-P allowed_providers] [-t life]
ssh-agent [-a bind_address] [-E fingerprint_hash] [-O option]
[-P allowed_providers] [-t life] command [arg ...]
ssh-agent [-c | -s] -k

fatal: failed to write commit object
Completed with errors, see above

ssh -V gives me OpenSSH_10.2p1, OpenSSL 3.6.0 1 Oct 2025 , so this should be > 8.2p1.

What puzzles me is that it says

/usr/bin/ssh-agent: illegal option -- Y

i.e. ssh-agent (!) not having the -Y option, not ssh-keygen .

When I run

/usr/bin/ssh-keygen with imvalid input, it clearly shows -Y sign as a supported option in the usage it prints. I haven't found documentation on what -Y should do on ssh-agent ?

How can I solve this? 

Thank you!

1 answer

0 votes
Tomislav Tobijas
Community Champion
December 2, 2025

Hi @Christian Roth ,

First recommendation would definitelly be to update Sourcetree. I believe the latest Mac version is 4.2.14. Also, check what the Git version is 👀

As for some troubleshooting recommendations, you could maybe check these: 

What you could check is your Git configuration for SSH signing.

git config --global gpg.format ssh
git config --global user.signingkey ~/.ssh/id_ed25519.pub # or your actual public key

And you would also need an allowed_signers file:

echo "your-email@example.com $(cat ~/.ssh/id_ed25519.pub)" > ~/.ssh/allowed_signers
git config --global gpg.ssh.allowedSignersFile ~/.ssh/allowed_signers

You could also ensure your SSH-agent is running by following the instructions here.

Lastly, you could try committing from the terminal to see if the error persists. If it works in the terminal, review SourceTree's preferences to ensure it's using the system Git and SSH (see instructions in "Set up SSH with Sourcetree" link)

Hope this will help troubleshoot the issue you're having.

Cheers,
Tobi

Christian Roth
December 3, 2025

Thank you so much, Tobi.

In fact, I can't commit from the terminal, either, with the same error showing. So it's not a SourceTree issue.

I tried adding

EnableSSHKeysign yes

to the respective config file per man ssh-keysign:

ssh-keysign is disabled by default and can only be enabled in the global client configuration file /etc/ssh/ssh_config by setting
EnableSSHKeysign to “yes”.

to no avail. All other things you mentioned seem to be available/set correctly. (Deliberately using "seem", because obviously, there must be some issue…)

I can perform signed commits using eclipse Egit to that same local repository, so I'll use that until I figure out what the problem with my Mac's CLI tools are.

Should I ever figure this out, I'll report back here.

Thank you!

 

Like Tomislav Tobijas likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events