Access a Git Repository Using SSH

  1. On the computer that you'll use to access the Git repository, generate a SSH key pair and upload its private key to VB Studio. See Upload Your Public SSH Key for instructions. Make sure that the Git client can access the private key on your computer.
    Ignore this step if you've already uploaded the SSH public key.
  2. Copy the Git repository’s SSH URL.

    On the Git page, from the Repositories drop-down list, select the Git repository. From the Clone drop-down list, click Copy to clipboard the Copy icon to copy the SSH URL:

  3. Open the Git client - perhaps the Git CLI.
  4. Navigate to the directory where you want to clone the remote Git repository.

    If the directory into which you want to clone the repository isn't empty, you'll need to create a new subdirectory and clone the repository into it. You can only perform a cloning operation into an empty directory.

  5. Using the Git client, clone the project’s Git repository.

    For example, if you’re using the Git CLI, use the git clone <repository-ssh-url> command:

    git clone ssh://usoracle22222.john.doe%40oracle.com@developer.us.oraclecloud.com/developer1111-usoracle22222_myproject/developer1111-usoracle22222_myproject.git

    If you've already cloned the Git repository to your computer using HTTPS, use the git add remote command to add the SSH URL of the Git repository:

    git remote add ssh-origin ssh://usoracle22222.john.doe%40oracle.com@developer.us.oraclecloud.com/developer1111-usoracle22222_myproject/developer1111-usoracle22222_myproject.git

  6. Commit the updated files to the cloned Git repository.
  7. Push the commit from the cloned Git repository to the hosted Git repository:

    git push ssh-origin main