Note that this is the original article I've been following along with:
http://www.markdotto.com/2011/11/02/how-to-deploy-sites-via-github/
To give you a bit of background: We have a private repo set-up under an organisation account. We have three developers (myself included) who have our own accounts with GitHub and have administrator rights to the private repo.
While working on the project we clone the repo and then create a 'dev' branch. We each work from our own dev branch and push changes to the 'dev' branch on GitHub.
We want to get this dev branch onto our remote server so we can test the combined code works before merging it into our master branch (which should be clean/always deployable).
From here we're following the above article steps which is to connect to our server via SSH, go to the relevant directory where our website is hosted and run the following command...
git clone [email protected]:ORGANISATION/REPO.git dev
The first issue we had was our server returned the message...
Cloning into dev...
ssh: connect to host github.com port 22: Connection refused
fatal: The remote end hung up unexpectedly
...where I would have it expected it to ask us for a password?
So instead we tried the HTTP url...
git clone https://[email protected]/ORGANISATION/REPO.git dev
...you'll notice the HTTP url uses my own USERNAME now when cloning. I enter my password and it displays Cloning into dev...
but then it displays the following error...
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://[email protected]/StormCreative/MoneyRepublic.com.git/info/refs
fatal: HTTP request failed
...I don't understand the error.
So how do we clone this private repo onto our server?
Any help appreciated!
Kind regards, Mark
The first issue happens because you don't have the local rsa key linked to your account on GitHub (and yes, you link the rsa key to your account, and the organisation is linked to your account as well).
In the local machine (or remote server) where you are trying to clone the repository, you need to generate a rsa key:
ssh-keygen -t rsa
When you are generating the key, you chose a password and a place to store the id_rsa.pub file, that actually contains the key.
On GitHub, you need to add this key, the exact content of id_rsa.pub, to your ssh keys on your account administration panel.