After installing TortoiseGit I used its puttygen.exe to generate a key. This gave me something like
---- BEGIN SSH2 PUBLIC KEY ----
Comment: "test@example.com-20110212"
AAAAB3NzaC1yc2EAAAABJQAAAQEAguK4gT6H6J0dKtf5S8NA8FkYHagIoKipN21Y
z0Ut6VAdwlUkE83aX96lZajrijes/fKPNbttAulwONLdtRXJMlJmUrOji13hNHTm
XLHlfRoFZpvq1wI8Wbt8RwdgTC/D7MVPUzjWkYOwVS9ywoUUee29nyHZDxv8rKL1
abZnCXHrEZdR0uutw+y02bm1KDL+suGGp5ecttAKPiWtWseH1R+aZZFgo9xFjl9K
UFzeIHUEYSnUX32+mSoIdHs4vZvzOCmZV0Q8/OUUWAsF1kaeH2Krp+dUazDNsVdb
/hlQMviPd38EKR/AzaMKLGEhWtWn3Sgt2FL/N1X8oJYUrLxmkw==
---- END SSH2 PUBLIC KEY ----
but git-dev.drupal.org doesn't like it and tells me
The key is invalid. It must begin with ssh-rsa or ssh-dss.
Need help with public keys? View the excellent GitHub.com SSH public key help at http://github.com/guides/providing-your-ssh-key.
So I click the link to a page that tells me
Attempting to redirect to the guide for your OS. If the redirect fails, pick your OS:
* Windows
* Mac
* Linux
Clicking the Windows link gets me to http://help.github.com/key-setup-redirect/msysgit-key-setup, which says
Page does not exist! Read the Full Documentation
Hmm...
Comments
Comment #1
eliza411 CreditAttribution: eliza411 commentedHow frustrating ... I'll be glad to work on sorting this out.
First, during upcoming documentation sprints attention to Windows directions is scheduled.
Second, the most current (and not broken) link for SSH keys is on http://drupal.org/node/1027094 and references http://theillustratednetwork.mvps.org/Ssh/Private-publicKey.html
Sadly, what seems to be GitHub's current directions for TortoiseGit at https://github.com/multitheftauto/multitheftauto/wiki/how-to-use-tortois... leads me to an Internal Server Error.
Finally, it's on my to-do list to write Drupal.org-focused key-gen directions, but I'm not sure when I can get there (Help welcome!)
At the very least I'll look at getting that message that leads to the wrong place updated.
Comment #2
eliza411 CreditAttribution: eliza411 commentedI did find this: http://help.github.com/msysgit-key-setup/, tested the directions and it works. I'll be updating our docs accordingly.
Comment #3
bdragon CreditAttribution: bdragon commentedThat's an SSH2 format key.
You need to load the key into puttygen and copy paste the text from the "Public key for pasting into OpenSSH authorized_keys2 file:" textarea.
Although I suppose it would be nice if the system used ssh-keygen -i to convert incoming SSH2 pubkeys into the corresponding openssh keys..
Comment #4
salvisThank you for your fast reply, eliza411!
I have JavaScript disabled, which is why I ended up on http://help.github.com/key-setup-redirect/, which has the bad link. Obviously, this is an issue on github, but it falls back on us. Enabling JS effectively got me to http://help.github.com/msysgit-key-setup/
I'm semi-educated on this ssh stuff, just enough to be completely confused. I've been using Putty for ages, which comes for Pageant for ssh key authentication. I'm not sure how msysgit intends to do it, but TortoiseGit comes with its own version of Pageant, even though it seems to be using msysgit underneath. This puzzles me to no end...
The trouble with msysgit is that I work under a non-administrator Windows account. msysgit's Setup requires administrator rights, so you have to run it under a different account. The trouble is that msysgit is then hard-wired to c/Users/admin_account/.ssh, which is inaccessible to the non-administrator work account. msysgit's Setup sets the system-wide "HOME" variable to the directory of the user that runs Setup, instead of "%USERPROFILE%", which would make this work. This can be fixed, of course, but it's not straight-forward, and it annoyed me enough that I decided to try TortoiseGit's puttygen first.
msysgit's ssh-keygen has now given me a key that seems to be acceptable. However, the test at the end of http://help.github.com/msysgit-key-setup/ is not working — ssh salvis@git-dev.drupal.org gets me a Password prompt. Is this because that last step of the github instructions doesn't apply to g.d.o, or because something's wrong with my set-up so far. Having such a checkpoint would definitely be useful.
So I try
git clone ssh://salvis@git.drupal.org/projects/acl.git
(according to http://drupal.org/node/1013552).
It tells me
Something is not working right, but I have no clue, where the problem could be.
Maybe 'git-dev' instead of 'git'? — Same result.
Check the project page: http://git-dev.drupal.org/node/87985/git-instructions
git clone --branch 6.x-1.x salvis@git-testing.drupal.org:project/acl.git acl
(add --branch, no protocol, 'git-testing', no //, colon instead of slash (!?), add directory)
That's a vastly different command, but the result is still the same error message.
Time to go to the "Troubleshoot 'git clone'" page at http://drupal.org/node/1065850. There's nothing about trouble-shooting on that page, but instead another set of different instructions:
git clone --branch master http://git-testing.drupal.org/project/acl.git acl
Wow, this seems to have worked ('http'!)
Ok, now
git clone --branch master http://git-dev.drupal.org/project/acl.git acl
This prompts me for a user name, I enter it, and then it prompts me for a password. So, key authentication is not working. And the git-dev password that I set isn't accepted either.
The variety of command lines offered is mind-boggling, and I still don't even have a clue whether my key is working or not.
Comment #5
bdragon CreditAttribution: bdragon commented"git clone --branch 6.x-1.x salvis@git-testing.drupal.org:project/acl.git acl" should have worked. It's possible that the server was overloaded when you tried or something.
The reason "git clone --branch master http://git-dev.drupal.org/project/acl.git acl" asked for a user name is because git-dev has http authentication to keep the bots out (remember? drupal/drupal) -- It won't work for a git checkout anyway, because it's the drupal.org test instance, not the repo.
Comment #6
salvis(our messages crossed)
What do you mean with "It won't work for a git checkout anyway, because it's the drupal.org test instance, not the repo."? Is the message above the expected behavior?
I think that 95% of the people who try this are people who already maintain a project on d.o. The obvious first move is to try to make a local clone of an existing project.
Creating a new project (which is touted prominently everywhere) is the 5% use case. I couldn't care less at this point. I need to know how I can keep maintaining my existing projects after the big switch to git! Am I too early for trying this?
Comment #7
bdragon CreditAttribution: bdragon commentedOh, it showed the key cached in registry comment again? That's probabaly what's gumming it up.. Try using putty or plink to connect to git-testing.drupal.org first and accept the fingerprint.
Comment #8
bdragon CreditAttribution: bdragon commentedIf that was the case, this will need to be documented. I am seeing evidence through searching that this is a common problem when mixing putty with git...
Comment #9
salvisAccepting the host key using PuTTY worked. Now I'm just getting
Still not what I'd like to see.
Comment #10
eliza411 CreditAttribution: eliza411 commentedWhat version of Git are you using? (In Git Bash, type 'git --version')
Comment #11
salvisgit version 1.7.4.msysgit.0
The trouble is I have no clue whether it's a local or remote key issue, or I have a wrong command line, or what...
Comment #12
eliza411 CreditAttribution: eliza411 commentedIf you were to join us on Freenode in #drupal-gitsupport, we might be able to sort it out a little faster :)
Comment #13
salvisI'm not sure that's the idea. Of course I really appreciate your help and the offer to go one-to-one, and I ultimately want to get this going for myself, but I thought the goal here was to refine the instructions and processes so they can hold up against real life situations.
Here you have one such real life situation. And you have a guy who is completely new to git and who wrestles with all the problems that everyone else will encounter, too, and who is dedicated and capable of giving you all the feedback you may want.
Are you sure you want to go the one-to-one route?
P.S. The instructions on http://help.github.com/msysgit-key-setup/ are great because they include a success/failure test at the end. You can tell whether you've reached the milestone or not. This is sorely missing here.
Comment #14
eliza411 CreditAttribution: eliza411 commentedI could have created better docs if I'd been able to solve this today. As is, this issue will be here for others to help with.
I did create directions at http://drupal.org/node/1066762. Not sure if they'll stay around since the documentation policy says we're supposed to link off-site. Since Drupal.org supplies password auth I can understand that position. Keys are complex enough that I'd wanted to add directions a long time ago but had been dissuaded. Not sure how it will turn out.
Anyway, good luck with the keys.
Comment #15
salvisI think I'm making some progress here.
When I try to install msysGit as non-admin, then I get a prompt that makes me choose from
( ) Use OpenSSH
( ) Use (Tortoise)Plink
No matter which one I choose, the installation fails in the end, because my Windows account doesn't admin rights.
If I install as admin, then I don't get that prompt at all. Still I have a global environment variable
GIT_SSH='c:\utils\plink.exe'
This is probably a left-over from a previous install, and it doesn't get removed when I uninstall msysGit.
After removing that global environment variable, things are looking better now: I get the expected
But then I get
Is git-testing.drupal.org taking the credentials from dropal.org or from git-dev.drupal.org? (git-dev is closed.)
Comment #16
eliza411 CreditAttribution: eliza411 commentedFrom git-dev. It'll be open in an hour or so, and it is schedule to stay up for the next couple days.
Comment #17
salvisYay, it worked!
So here's what I learned: When setting up msysGit
%USERPROFILE%
.Thanks for all the help, eliza411 and bdragon!
Comment #18
eliza411 CreditAttribution: eliza411 commentedYay. I'm going to mark this fixed, then.
Comment #19
sunThe solution is to simple:
git.drupal.org
STRG + C
)Comment #20
sunAdded that info to the howto section on http://drupal.org/node/1027094
Comment #21
salvis@sun: I'm pretty sure that's what I did, and what got me the "fatal: The remote end hung up unexpectedly" error.
Comment #22
Sohodojo Jim CreditAttribution: Sohodojo Jim commentedSun, Salvis and Bdragon,
I, too, wish that Sun's 'five-step' fix-it was all that was needed but I am struggling with this as well. I'm on Windows 7 and have an otherwise Happy Camper relationship with TortoiseGit for both GitHub and my own remote repositories. Following the GitHub instructions was so quick and sure-fire that I was up and cooking pronto on that system.
Sadly, I am at a 'how many times will I hit my head on this wall' problem with getting my set-up to work with Drupal's git repo. I followed all the instructions for generating the key pair and got it in my SSH public key section of my DO user account, no sweat. But like salvis, no matter what I try via git-bash, command prompt, TortoiseGit... I get the same showstopper which is the Plink password prompt and the hang up.
I was hopeful that, as BDragon suggested that Puttygen would somehow work into a conversion/update situation. Say, for example, that something would get the DO repo into the known_hosts file in my .ssh subdirectory (which seems to be an important reference for TortoiseGit's putty configuration. Although I may try it, I hestiate to take salvis' approach of reinstalling TortoiseGit to stop using Plink for SSH as this is already working well in other situations. But if that turns out to be the only way, that'll have to do.
I'll keep an eye out for additional insights here and elsewhere and post any advances toward resolving this for myself.
--Sohodojo Jim--
Comment #23
Sohodojo Jim CreditAttribution: Sohodojo Jim commentedSuccess!
I killed the TGitCache.exe process via Task Manager and reran the testing command:
git clone mygitdrupalname@git-testing.drupal.org:project/examples.git
which re-prompted for the public key acceptance. This gets the testing-DO repo into my known_hosts file which is good. The clone then inits the empty project directory... again good and expected. But then I am hit with the password prompt.
I then figured I would beat on puttygen a bit (as per Bdragon's suggestion). I then did 'File/Load private key' to import the private key I generated following the basic Drupal Git Windows key/auth instructions. (I had already uploaded my public key into my DO account as per instructions.) I then did a 'Save private key' (a button in the PuTTYgen dialog-window) which converts and saves your SSH-generated key into a 'ppk' file format that TortoiseGit is happy with (when installed with the recommended Plink config rather than SSH alternative).
I then did a typical 'Git clone...' within Windows Explorer in the directory where I wanted my cloned project repo to be.
In the TortoiseGit 'Git clone' dialog, I pasted the username@repo-url portion of the clone command mentioned above (and set the destination directory).
NOW HERE IS THE IMPORTANT PART: I then checked the 'Load Putty Key' checkbox and browsed to the directory and selected the '.ppk' (Plink-friendly) version of my private key, hit 'OK' and WHAM! TortoiseGit opened the 'cloning in process' window and sucked the project right down nothing flat! :-) Yeah, Happy Camper be I!
--Sohodojo Jim--
Comment #24
thePanz CreditAttribution: thePanz commented@Sohodojo Jim: you can use PageAnt to handle and load a set of ppk keys entering only one time their passwords. You should now not check the "load putty key" in GIT dialog.
I'm writing a tutorial on how to set-up Drupal ssh keys with Putty instead of msysgit, you can find it here: http://thepanz.netsons.org/post/drupal-tortoisegit-and-putty-configuration
Comment #25
Sohodojo Jim CreditAttribution: Sohodojo Jim commentedHey Panz,
I saw the mention of your article on the mailing list and I greatly appreciate your having taken the time to figure out and document the 'correct' (or at least a substantially better way) to config TortoiseGit for Drupal repo access. In fact, I strongly believe that your article should as quickly as possible find its way into the docs here on the DO site as your method will surely help Windows-based devs to have a cleaner Git-start after the migration.
The experience report I provided is not a right/recommended way as much as it is a 'make-do' for getting back on track after having tried to follow the current instructions that don't work for TortoiseGit folks.
Regardless of whether it is your direct path or a winding road like I unfortunately took, once TortoiseGit is set up correctly, it is a great and efficient means to participate in the post-CVS Drupal Universe.