Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SourceTree GUI can't push, terminal can push

Following problem: When I commit things, I can't push them by clicking on the GUI push button I get this error message:

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin master:master Pushing to ssh://[email protected]/srv/git/MyFolder/MyProject.git

fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

When I copy the EXACT same command from this error message and klick on the "Terminal" button and paste it there, it works like expected, without any errors.

What I'm doing wrong?

like image 935
Piranha Avatar asked Apr 01 '15 10:04

Piranha


2 Answers

I guess SourceTree can not read from the remote repository because it can not authenticate you.

Make sure that SourceTree can access your ssh key. You can use pagent to do that.

like image 134
René Link Avatar answered Oct 16 '22 22:10

René Link


By changing "SSH client configuration" to OpenSSH and set your id_dsa, it will be fixed (SSH keys should be created and added to gitlab first).


Go to Tools->Options->General: in SSH client configuration set the SSH Client to OpenSSH, select your id_dsa for SSH Key.

like image 2
hamid.ma Avatar answered Oct 16 '22 21:10

hamid.ma