Getting Askpass for every action even when its not needed
I added ssh to the ssh-agent so I don't have to constantly add the password to the sourcegit but it keeps giving me the askpass prompt for pull, push, fetch and commits.
Even when deleting branches I also get the askpass prompt. What I find wild with deleting branches is that if you cancel the askpass prompt, the branch gets deleted either way.
This window is launched by ssh not SourceGit:
https://github.com/sourcegit-scm/sourcegit/blob/0a74dd64ce63cb4def3210291013ab50f80149d6/src/Commands/Command.cs#L167-L175
Make sure you have enable the AddKeysToAgent configuration in ~/.ssh/config
Host *
AddKeysToAgent yes
Hi, I have same problem, mint, manjaro. All time when I want to do some git actions - always prompt for ssh key password
➜ ~ cat ~/.ssh/config
Host *
AddKeysToAgent yes
If your private key has a passphrase, each time you use it, SSH will ask for its password. You can use ssh-keygen -p -f <private_key> to reset its password to empty.
I added
Host *
AddKeysToAgent yes
and the ssh-agent is running on my terminal, however I still receive the AskPass prompt.
I even tried it out with a file creating, deleting, committing and pushing over terminal which worked without any issue. Then the same approach with sourcegit and I still get the prompt.
Then I added this code below in ~/.ssh/config and attempted the same process again.
Host github.com
AddKeysToAgent yes
IdentityFile ~/.ssh/id_work
BatchMode yes
This time, sourcegit decided not to commit or push and simply gave me a "Permission denied (publickey)." error even though it works on the terminal. Not giving me any prompt anymore because of BatchMode yes.
I would also not take the ssh-keygen -p -f <private_key> approach since you are not keeping your SSH Key secure this way.
If this was an SSH issue then it would have also happened on the Terminal which it didn't.
This may be because the private_key_file is passed into the SSH command every time in the code:
https://github.com/sourcegit-scm/sourcegit/blob/0a74dd64ce63cb4def3210291013ab50f80149d6/src/Commands/Command.cs#L175-L179
Later, I'll check if there is a better way to handle the SSH connection.
I test this on Windows platform that when installing GIT, using external openssh (without using the built-in SSH) does not have such problems.
Makes sure ssh-agent service is running
BTW, on which system do you encounter this problem?
BTW, on which system do you encounter this problem?
I use Linux: Manjaro, Mint, Ubuntu distributions
On Windows 10/11 this problem not exists :)
BTW, on which system do you encounter this problem?
I use Linux: Archlinux & Windows 11.
This happened so far only on Archlinux but I will check Windows later today.
I've test this on Ubuntu. After manually add keys to ssh-agent, it will not ask me for passphrase any more.
eval `ssh-agent -s` # Makes sure `ssh-agent` started
ssh-add <private_key_file> # The `<private_key_file` is the same one with `SSH Private Key` of remote configuration in `SourceGit`
# Then restart `SourceGit` and try to fetch/pull/push/create commit in `SourceGit`
I think I know why.
- When I started
SourceGitfrom the terminal session that just runseval `ssh-agent -s`, this issue does not exists - When I started
SourceGitfrom other terminal sessions that have not raneval `ssh-agent -s`, this issue appears
Maybe, SSH_AGENT_PID and SSH_AUTH_SOCK are needed by ssh command
Fixed. When creating linux packages, a custom script (instead of symbolic link for /opt/sourcegit/sourcegit) has been added into /usr/bin.
The content of /usr/bin/sourcegit is:
#!/bin/bash
eval `ssh-agent -s`
/opt/sourcegit/sourcegit $@
You can download the latest CI build from Github Action.
You can download the latest CI build from Github Action.
Just tried it locally and it works but I don't think I can test it out properly through the Terminal.
I just tried the develop branch and it worked but the same happened with master as well which doesn't have your changes. I am guessing the Terminal still executes ssh-agent even after I built and adds this to sourcegit when testing locally.
I will merge develop into master on next Monday.
I don't think I can test it out properly through the Terminal.
This is not important. Because in both non-commandline mode and commandline mode, the executed file is the same one: /usr/bin/sourcegit.
See: sourcegit.desktop
[Desktop Entry]
Name=SourceGit
Comment=Open-source & Free Git GUI Client
Exec=/usr/bin/sourcegit
Icon=/usr/share/icons/sourcegit.png
Terminal=false
Type=Application
Categories=Development
MimeType=inode/directory;
It is with great sorrow and a heavy heart that I must inform you that I am still getting this bug in version 2025.28.
I am using the AMD64 AppImage under Fedora SilverBlue. Every time I fetch, pull, or push, I'm prompted to input the password for my SSH key ~6 times. I'm going to revert back to 2025.25 for now, which doesn't have this behavior.
I'm going to revert back to 2025.25 for now, which doesn't have this behavior.
Strange.
Unfortunately, on linux manjaro problem still exists
Try to launch SourceGit from terminal and call eval `ssh-agent -s` first before that
Try to launch
SourceGitfrom terminal and calleval `ssh-agent -s`first before that
like this?
➜ ~ eval `ssh-agent -s`
Agent pid 7729
➜ ~ sourcegit
prompting for password every time
-- edit --
but if I add manual key
➜ ~ ssh-add ~/.ssh/id_ed25519
Enter passphrase for /home/piofra/.ssh/id_ed25519:
Identity added: /home/piofra/.ssh/id_ed25519 (PioFra-ed25519)
➜ ~ sourcegit
SourceGit don't want password, and git command working ok
but if I add manual key, SourceGit don't want password, and git command working ok
I'm seeing the same thing as Piotr except that manually re-adding my SSH key to ssh-agent has no effect.
I ran into this issue today only after upgrading to 2025.28 and 2025.29. Running ssh-add to re-add my private key didn't help.
However, I just downgraded to 2025.27 and it is back to normal (i.e. not asking for my SSH keyfile password for each action). I'm on Pop!_OS 22.04 LTS.
I've reverted the changes since 2025.27
Sorry for not coming back on this. The error has been persistent and I went from 2025.26 to 27, 28 and now 29.
On the latest version it still happens but doesn't happen when running over the terminal.
This was already the case on version 2025.26.
I was contemplating if this has to do since I am using zsh and not bash. However, I switched to bash on different Terminal (Konsole, Kitty and Ghostty) I could still pull and push without putting in a password.
Not sure what else I can try to make SourceGit work.
Currently running 2025.29 over AppImage.
I'm seeing the same problem in the latest version of SourceGit 2025.29 on Ubuntu Linux 22.04.5 LTS. Every time I do a Git Fetch, it keeps asking me for the SSH password.
But when I run git fetch in a Terminal, I do not get this problem. On the Terminal, it only asks for the password once, after I restart the computer, and then it is saved somewhere so that I don't have to keep retyping it.
This problem did not happen in older versions of SourceGit, like sourcegit-2025.14.linux.amd64.AppImage and sourcegit-2025.25.linux.amd64.AppImage
@ozmium Could you help me test the latest CI build from Github Action? I have rolled back the relevant code to 2025.14.
https://github.com/sourcegit-scm/sourcegit/actions/runs/16932437575
@love-linger if you need any tests, I'll be happy to help you. also I can take a look at the code and try see what the problem is.
@piotr-fraczek Thank you very much. You can download and test the latest CI build from Github Action. https://github.com/sourcegit-scm/sourcegit/actions/runs/16932437575
The source code about SSH settings in git command is https://github.com/sourcegit-scm/sourcegit/blob/e87eb8137bc043e0ca8568ce003fe22c4416dcb1/src/Commands/Command.cs#L175-L187
@love-linger I can try to help with the testing, but could you please also fix this issue?
- https://github.com/sourcegit-scm/sourcegit/issues/1725
Please try to add it into the CI build.
By the way, when I download the SourceGit AppImage on Ubuntu Linux, I always make my own Desktop Icon Launcher, with settings like this:
/home/username/.local/share/applications/SourceGit.desktop
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=SourceGit
Icon=/home/username/Apps/SourceGit.icns
Comment=Source Git Client
#Exec=/home/username/Apps/sourcegit-2025.14.linux.amd64.AppImage
Exec=/home/username/Apps/sourcegit-2025.29.linux.amd64.AppImage
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
#StartupNotify=true
I don't know if this is causing the bug or not.
I use these guides:
- https://dev.to/duhoang/ubuntu-create-postman-shortcut-31jp
- https://askubuntu.com/questions/1026528/adding-custom-programs-to-favourites-of-ubuntu-dock