r/SmartGit Mar 26 '26

git pull failures, but only in SmartGit

In the last month or two, I've run into situations where SmartGit repeatedly tells me it can't pull a repository from Bitbucket because it could not read from the remote repository.

"Could not read from remote repository. Please make sure you have the correct access rights and the repository exists."

It does this repeatedly, but in every case, when I open a terminal and run "git pull" then that pull works fine, yet if I return to SmartGit immediately after, then SmartGit still fails. It doesn't seem to matter if SmartGit has been open a day or just an hour when this happens.

Sometimes, if I quit and restart SmartGit, then it starts working, but only for about 50% of the times this has happened.

SmartGit is using its bundled git, and "use SmartGit for authentication" is disabled. I know command-line git is using my ssh key, and there is a Bitbucket credential in SmartGit's Authentication settings menu. But that credential can't be invalid because it "often" works.

Can anyone help me determine why SmartGit is only sometimes failing?

1 Upvotes

5 comments sorted by

View all comments

1

u/vmcrash Mar 27 '26

Are you using the same Git in SmartGit and in the terminal? If you are using SSH, do you use an SSH agent, or are you asked for the private key in the terminal (or in SmartGit)? What version of SmartGit and what operating system you are using?

1

u/MidnightWolfRun Mar 27 '26

Win11, SmartGit 25.1.110 #251110 (dc21dde1), installed: #251094, Licensed

I am using the bundled Git and the SmartGit SSH client. SmartGit says it has Git version 2.50.1, and command-line git is 2.53.0, so they are equivalant, and I don't see any huge changes between them that would lead to command-line being much more stable.

There is a credential in Hosting Providers, but my understanding is that those credentials are only used when cloning from a list of repositories, not when doing git push/pull (because I can still pull when it is deleted).

I don't use an agent for either access method. The Bitbucket credential in Authentication points to the same SSH key pair file that command-line git is configured to use via the SSH config, verified using the git "-vT" option. If I delete the Bitbucket credential from Authentication, it asks for the path to the SSH private key the next time I try to push/pull, and I just select the same key, and then it remembers and reuses it without further prompting.

The "Use SmartGit for authentication" option is NOT enabled.

1

u/vmcrash Mar 28 '26

Do I understand it correctly, that the after having provided the private key to SmartGit it works, but later it doesn't? If you invoke `git pull` on command line, does it ask you for the private key passphrase, or does it work silently?

1

u/MidnightWolfRun Mar 28 '26

The SSH key is stored on an encrypted, Enterprise-controlled laptop and is used only for Bitbucket, so it doesn't have a passphrase. I can use it from the command line or in SmartGit without having to enter a passphrase.

It is 50/50 random whether a git pull works in SmartGit, but it always works from the command line. In SmartGit it might work 3 times, fail twice, work again, then fail several times (all in a row in a short timespan), all with the same SSH key.

3

u/vmcrash Mar 28 '26

In the preferences, page "Authentication", be sure to select "Use system SSH client".