NewB Question re SSH Keys

NewB Question re SSH Keys

21 posts / 0 new
Last post
nosmalldreams@gmail.com's picture
nosmalldreams
Points: 0
NewB Question re SSH Keys

I know I'm missing something basic, hoping someone may be able to help. I want to clone an Acquia repo into Dev Desktop that someone else uploaded there. I know I have permission, because he site is in my Sites listing at https://insight.acquia.com/site-list. In Dev Desktop, I followed these instructions to generate an ssh key and save it in my Acquia account: https://docs.acquia.com/dev-desktop/keygen. Then I try to clone the repo, but it says "SSH authentication failed. Please provide another key." I've tried generating the key on the page for cloning the website also, same result. I tried with and without a password for the SSH key. I'm accepting the default location for the key. I just don't get what I'm doing wrong. Any assistance will be much appreciated!

Status: 
Unresolved
dmyburgh's picture
david.myburgh
Points: 99

Hmm, it sounds like you're doing all the right things to get your key in there. However, I would try to generate your key from the command line, because Dev Desktop does not currently create 4096 bit keys (we recently upgraded our requirements to 4096 for ssh keys). See this page for help on how to do that: https://docs.acquia.com/cloud/ssh/enable/generate. If that still doesn't work, remove yourself from the team for that subscription, and then get added back. Sometimes that works.

ea2124@cumc.columbia.edu's picture
ea2124
Points: 0

So you require 4096-bit keys but your Dev Desktop app only generates lesser-bit keys? In other words, Dev Desktop needs to be updated to generate the correct keys. It's been several months now. Please fix your broken program.

dmyburgh's picture
david.myburgh
Points: 99

I was mistaken, DD does generate 4096 bit keys. So there you go: fixed already!

ea2124@cumc.columbia.edu's picture
ea2124
Points: 0

That's good to know, but now our problem is that it just doesn't work. The same error message the OP had applies to us. I could try the remove/re-add to the team, but I'm the admin. Who would add me back?

dmyburgh's picture
david.myburgh
Points: 99

Are you on Mac or Windows? If you're on Mac, you can try generating from the command-line and using that key.

dmyburgh's picture
david.myburgh
Points: 99

Can you also see your SSH key in the Users and Keys list (on insight.acquia.com) for the site you want to clone?

ea2124@cumc.columbia.edu's picture
ea2124
Points: 0

Nope, Windows. I tried to use puttygen also, with no success. But the Dev-Desktop process is very simple, right? I have a hard time seeing how something I'm doing wrong is impacting it's inability to work.
1. Generate... private key in Dev Desktop
2. Save private key locally (Dev Desktop)
3. Copy public key to clipboard (Dev Desktop)
4. In my Acquia account, "Add SSH Key"
5. Paste key and name the key (Acquia account)
6. Browse... locally and choose private key file that was just saved (Dev Desktop)
7. Click OK.

What could I be doing incorrect in this process?

ea2124@cumc.columbia.edu's picture
ea2124
Points: 0

I can indeed see my SSH key in the Users and keys list for the site I want to clone.

dmyburgh's picture
david.myburgh
Points: 99

The process does seem straight-forward. I'm on a Mac so I wonder if this is something specific to Windows. I'm going to create a new user and try your process on a Windows setup. I'll let you know how it goes.

dmyburgh's picture
david.myburgh
Points: 99

Well now, that is interesting. I get the exact error you folks are getting. I had a second user that already an SSH key, but I created a new one and added it. I then thought having two might be the issue, but deleting the first one had no effect. I'll be testing Git and SSH command line access shortly to see if its specific to DD or something to do with the keys themselves. More to come...

dmyburgh's picture
david.myburgh
Points: 99

OK, I think I might have a real solution here. I had copied my keys into a random folder and pointed DD at them. That threw out the error you're all seeing. I installed Git-for-Windows and it didn't like that location and wanted them in the Unix default folder of ~/.ssh. So I moved my keys into /Users/[me]/.ssh/ and then I could manually checkout the git repo and ssh into the server. Then I tried the checkout through DD, and after selecting the new location for the private key, it worked!

So, make a folder .ssh in your Users/[myname] folder, move your keys there, point DD to them, and try the checkout again.

ea2124@cumc.columbia.edu's picture
ea2124
Points: 0

Ah, that's the default location, and where I've been putting the keys. I then tried to put them in several other places (C:/, desktop, app directory) to no avail either.

dmyburgh's picture
david.myburgh
Points: 99

Bugger. Hmm. OK, do you have some Git tool installed on your system? Preferably something that has a bash tool as well e.g. http://git-for-windows.github.io. Try checking out your repo manually and see if that works. That will at least tell you if your key is being picked up properly.

acquia@essentialtech.co.nz's picture
acquia
Points: 0

I'm having the same problem as the OP... my key is being saved in c:\users\[me]\.ssh and was generated by Dev Desktop... but it won't accept it. Its quite frustrating... is there any solution to this?

UPDATE: Turns out if I just cancel that key generation page after it gives me the error and go back a step to the previous page I can actually clone anyway... I'm not convinced its 100% right, but it seemed to work anyway. Seems like the tool could use a little polishing...

anguyen@collegeboard.org's picture
anguyen
Points: 11

Thx, that did the trick for me also.
(Cancel out of SSH page and continue.)

apayne2@ecommunity.com's picture
apayne2
Points: 5

Thx, that also did the trick for me also. I did it using command line and in the application.
(Cancel out of SSH page and continue.)

Status Change: 
Resolved
happysnowmantech's picture
kathryn
Points: 0

I just ran into this problem and the workaround in #15 worked for me.
Acquia, please fix this bug.

graham@gmweb.com.au's picture
graham
Points: 0

#15 worked for me.

1. Install DD for Mac
2. Go through all of the process to install the program and start hosting your local site with Acquia Cloud, generate new SSH key, enter password to decrypt the key, get the error message
3. Click Cancel
4. Click "Host with Acquia Cloud" again, enter the password to decrypt the key, archive file generates and the site gets uploaded

info@feelcreative.com.au's picture
info
Points: 1

Don't mark this as resolved! There is a work around but it still needs to be fixed.

Status Change: 
Unresolved
fhchen@tw.ibm.com's picture
fhchen
Points: 0

After generating the SSH key in Acquia Dev Desktop , you have to do the below steps.

1. Copy the public key.
2. Go to your user profile in Acquia site --> Credentials --> Add SSH key --> Paste the public key here --> Click "Add key" button
3. Waiting an e-mail sent from Acquia: An SSH key was added to your Acquia account. Then you can synchronize the local site with the cloud site without the error.