I am trying to configure SSH on a windows server and I'm attempting to connect to it with SourceTree.
The server is Windows 2008 R2, with Bitvise SSH installed, configured and running as expected. (I can SSH in via putty... everything is working as expected)
In both Bitvise and git, I have configured the default / starting directories to be D:\ (the data drive, large enough to hold all of our repositories)
When I'm on the server, running a shell window (sh.exe --login -i) opens the the D drive as I would expect... as does an SSH connection via putty... but when I attempt to connect to the server using SourceTree... I am told that the folder I'm browsing to "doesn't appear to be a git repository"
This obviously suggests a pathing problem, and with further log diving... I have confirmed this to be the case.
My Actual structure:
SourceTree is attampting to find my project at:
Here is the connection URL I am using:
Checking my server SSH logs... I can see that the following command is running when SourceTree connects:
sh.exe --login -i -c "git-upload-pack '/repo/project.git'"
And I recieve the following error message:
fatal: protocol error: bad line length character: Welc
fatal: 'C:\Program Files (x86)\Git\repo\project.git' does not appear to be a git repository
This is, of course, true... there is no repo at that location... but if I execute "sh.exe --login -i" on the run dialog on the server... the path is correctly opened to the D drive.
I'm sure that I'm just missing something simple here...
What do I need to do to force the starting directory to be D:\ rather than C:\...\Git when SourceTree connects to a local server?
Please note that I can successfully clone this repo if I use the file protocol (the D drive on this server is a network share)... but this is far too slow for production use.
Thank you for your help!
So for anyone finding this question... here are the steps to fix the problem I was having.
just above the following:
# normalize HOME to unix path
HOME="$(cd "$HOME" ; pwd)"
This hard coded the home directory in git to the D drive for all users (which is where our repos are located).
After making this fix... it uncovered another problem that was causing SourceTreet to die.
The Message of the Day /etc/motd had some default text in it... which was printing out each time a user connected over ssh... and SourceTree was choking on it. Removing the text from this file fixed the final error we were running into.
A little diheartend by the total lack of support here... does noone have any experience to even provide a suggestion?
Here is a screenshot of a PuTTY connection...
regardless of what I do, I am presented with the following dialog in SourceTree:
Anyone have ANY ideas? This looks to be a git setup issue... but I can't figure out what to do differently...
I have been reading through mountains of documentation without any success.
The basic question is:
How go I make git start all my users off in the D:\ directory rather than the C:\Program Files(x86)\Git directory?
Thank you for your help
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork? We've compiled a list here, along with...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs