I have Windows 10 Enterprise, I'm on a VPN (shouldn't matter).
I installed sourcetree portable version 3.4.3 64bit on it.
I have my ssh keys as generated by the ssh-keygen that comes with Windows 10 Enterprise. I simply ran "ssh-keygen -t ecdsa -C "my comment""
I have the public key from that pasted into my SSH public value in my gitlab account.
git operations with command line git work fine (using PortableGit 2.30.1) with these same keys (located as usual in \Users\<username>\.ssh )
I do have sourcetree set in the General tab to use openssh
When I try to a clone from the Remotes in sourcetree I always get this kind of error
Command: git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks ls-remote https://<site url to gitlab>/project/subproject.git
Output:
Error: remote: Git access over HTTP is not allowed
fatal: unable to access 'https://<site url to gitlab>/project/subproject.git/': The requested URL returned error: 403
where I've made the exact URL anonymous just for posting. What's so odd is that I cloned from the exact same gitlab with the portablegit via command line, then I imported that directory tree into sourcetree as a "local repo" and sourcetree then seems to successfully do pulls and fetches (It says "pull successful") but if I try to use sourcetree directly to clone I get the 403 type error above. I would have thought that a fetch or pull would exercise the authentication with gitlab in much the same way as a clone.
I am using my ssh key with a passphrase and I typed that into the sourcetree agent prompt that shows when it starts up (BTW that's kind of error prone, sourcetree at startup seems to spawn a command line window to load the agent which sometimes isn't visible (might be under windows) so the user can go off and try to use sourcetree with the agent not loaded with the Passphrase. I'd suggest some kind of popup built into sourcetree so the prompt is more in your face)
I found the answer myself, the clone syntax was wrong I had:
https://<host serving gitlab>/project/subproject.git
that results in the 403 so I tried:
ssh://git@<host serving gitlab>/project/subproject.git
and that worked. I figured that out by looking in a working command line git .git/config file and stealing the URL format from that. So I think that means the PAT is not being used, at least not for cloning. Maybe sourcetree uses the PAT still for getting lists of repos from the server and other stuff in the gui. It would be helpful to show some sample url formats in the clone popup.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.