If you want to work with your applications on Objective-Cloud it is required that we have your public key. We need your public key for several things. If you have never worked with public/private key cryptography then this all may seem a bit confusing to you. If you have an incorrect SSH setup on your Mac then you won't be able to clone/pull and push your applications from/to Objective-Cloud.
There are several ways to determine if your SSH setup is correct. The easiest test is to try to clone an existing cloud application. If it works then you can be pretty sure that your setup is correct. If it doesn't or if you have to enter a password then there is something wrong. Another way to determine if everything is working correctly is to execute the following command in Terminal:
$ ssh -v email@example.com
If your SSH setup is correct then you should see something similar to:
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 debug1: Reading configuration data /etc/ssh_config debug1: /etc/ssh_config line 20: Applying options for * debug1: Connecting to git.objective-cloud.com [126.96.36.199] port 22. debug1: Connection established. debug1: identity file /Users/USER/.ssh/id_rsa type 1 debug1: identity file /Users/USER/.ssh/id_rsa-cert type -1 debug1: identity file /Users/USER/.ssh/id_dsa type -1 debug1: identity file /Users/USER/.ssh/id_dsa-cert type -1 ... MORE OUTPUT ... PTY allocation request failed on channel 0 hello 35937ijfb52nx, this is git@Ubuntu-1204-precise-64-minimal running gitolite3 v188.8.131.52-1-gf8776f5 on git 184.108.40.206 R W YOUR_CLOUDAPP ... debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug1: client_input_channel_req: channel 0 rtype firstname.lastname@example.org reply 0 debug1: channel 0: free: client-session, nchannels 1 Connection to git.objective-cloud.com closed. Transferred: sent 3392, received 3568 bytes, in 0.3 seconds Bytes per second: sent 12203.2, received 12836.3 debug1: Exit status 0
The line(s) starting with
R W are very important. They denote the repositories you have read-write access to. If you have no read-write access to anything then you cannot clone nor push your application. This is also an indication of an incorrect setup.
SSH is very flexible and can be configured many ways. Fixing an SSH problem almost always means to change your current configuration. We assume that if you are reading this you have no real preference with regards to your SSH configuration. We will describe a default configuration that is good enough for most people. The configuration we propose is something like a last resort because it requires you to start over. Please note that the proposed configuration is for people who have never used SSH or git over SSH before. Thus by starting over we do not really destroy your configuration because you don't really have a working configuration anyways. Lets begin.
The first thing you should do is to delete your current incorrect configuration. You do this by executing the following command in Terminal. You can make a backup of your
.ssh folder before you do that.
# DANGER: THIS WILL DELETE YOUR CURRENT SSH CONFIGURATION. # DO THIS ONLY IF YOU WANT TO START OVER. $ rm -Rf ~/.ssh
Next, you have to create a new key-pair. This can be done by executing the following command.
$ ssh-keygen -t rsa -C "email@example.com"
The ssh-keygen tool will guide you though the creation process. You can confirm each question with
enter which will use a default value. Please do not change the location of the key-pair nor enter a passphrase.
Now you should have a working SSH configuration. You have to tell Objective-Cloud about your new public key. Execute the following command to copy the public key into the clipboard.
$ cat ~/.ssh/id_rsa.pub | pbcopy -pboard general
Now go to Objective-Cloud Connect, login, goto your account settings and paste in the key. Now you should be able to clone, push and pull your repositories.