Skill Level: Beginner

Learn how to create and connect to a Git repo on one of IBM Cloud Git Repos and Issue Tracking servers.


  • Install the following on your machine:
  • Create an IBM Cloud account, if you don't have one.


  1. Connect to one of IBM Cloud Git Repos and Issue Tracking servers to create a repo

    Skip this step, if you aleady have an existing repo that you want to use.

    Connect to one of the IBM Cloud Git Repos and Issue Tracking servers listed in this page: (I chose “us-south.git.cloud.ibm.com” for this recipe)



    Click “New project” and complete the information below, then click “Create project” button:



    Observe the two messages at the header of the page indicating that you need to configure SSH and create a personal access token. That is what you are going to do in the following two steps.



    Copy the repo URL from the “Clone” for the next step. NOTE: You will just need the first part of the URL without the repo name which should look like this: https://us-south.git.cloud.ibm.com:<yourusername>


  2. Generate an SSH public key on your machine to be used to access the repo on IBM Cloud

    Execute the following command from the command line and press enter when prompted for input to accept defaults.


    Copy the content of the one-line in the id_ed25519.pub file generated for the next step. Make sure you include the last part of the line that has your username.

  3. Add the SSH public key to the repo on IBM Cloud




    Paste the content of the id_ed25519.pub file into the “Key” box and press “Add key”.


  4. Generate a personal access token on IBM Cloud so that you can commit code changes from your local machine later



    You just need to have “write_repository” scope, but you can select all of them and click “Create personal access token”.


    Copy your personal access token for the next step.



  5. Clone the repo locally and make your first push

    Execute the following commands from the command line. You’d better create a new directory for your new local repo and run the commands from there. When you get challenged for a user name and password use your git user name and the personal access token (you copied from the previous step) as the password.


    Observe the file you created on your local machine being listed on the repo online.


  6. [Optional] Make an update to a file locally and commit the change to IBM Cloud

    Execute the following command from the command line. This is to update the same file you created and push it to the repo.


    Observe the updated content of the on the online repo.


Join The Discussion