Supported GIT Client
Download GIT here. (Only clients using GIT 1.7.X and above are supported)
What protocols does CloudForge support for GIT?
You can either use HTTPS or SSH.
- HTTPS: Uses your CloudForge username and password to authenticate
- SSH: Uses a private and public SSH key pair to authenticate.
Your choice. Using HTTPS is arguably easier, since you only need your username and password. But most likely it will require you to enter your password every time.
While SSH takes a bit to setup - you need to create an SSH key pair, and upload the Public key to CloudForge - in the long run is more convenient. More details on both below. Make sure to get the respective GIT URL from your project page:
Using GIT with HTTPS
Your GIT HTTPS URL will look like this: https://USER@ORG.git.cloudforge.com/PROJECT.git
Here is an example:
git clone https://firstname.lastname@example.org/project.git
You will be prompted to enter your password
You can now cd into the product directory from the clone
git add .
git commit -a -m "test"
git push origin master
After you've that once, you can merely "git push" as normal. The "origin master" is only required the first time.
Using GIT with SSH
Your GIT SSH URL will look like: ssh://git_ORG@ORG.git.cloudforge.com/PROJECT.git
Follow this steps:
- Upload your SSH public key first to CloudForge:
(Also available from "My Settings" in your CloudForge account)
- If you don't have a pair of SSH keys, run in the command line:
- Set your .gitconfig
- $ git config --global user.name "Johnny Beans"
- $ git config --global user.email "email@example.com"
- Make sure your email is the same as the one you use in CloudForge.
(ORG is your CloudForge domain, and PROJECT is the name of your project - Access URLs are available in the Project detail page in your CloudForge Dashboard)
- git clone ssh://git_ORG@ORG.git.cloudforge.com/PROJECT.git
- You will NOT be prompted to enter your password - Assuming you uploaded your public key, and your private key is in ~/.ssh - you should be good.
- You can now cd into the product directory from the clone
- touch test.txt
- git add .
- git commit -a -m "test"
- git push origin master
After you've done #7 once, you can merely "git push" as normal. The "origin master" is only required the first time.
- While pushing to CloudForge Git repository, you get error: Cannot access URL https://firstname.lastname@example.org/project.git, return code 22 error: failed to push some refs to 'https://email@example.com/project.git'. This is most likely because you are using an older Git client. Make sure your git client is 1.7.x and above.
- While pushing to CloudForge Git remote repository, you get error: RPC failed; result=22, HTTP code = 401. This means that you don't have Git Developer (R/W) permission to the repository.
- While executing a git clone command, you get error: The requested URL returned error: 401 while accessing https://firstname.lastname@example.org/project.git/info/refs. This means that you don't have access at all to the Git repository.
Anytime you see a http error code 401, it means that you need to configure CloudForge security properly in order to gain access to CloudForge Git repository.