- Using Visual Builder Studio
- Common Tasks
- Manage Source Code Files with Git
- Set Up a Git Repository
- Access a Git Repository Using SSH
Access a Git Repository Using SSH
- 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.
- 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
to copy the SSH URL:
- Open the Git client - perhaps the Git CLI.
- 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.
- 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%40example.com@developer.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%40example.com@developer.oraclecloud.com/developer1111-usoracle22222_myproject/developer1111-usoracle22222_myproject.git
- Commit the updated files to the cloned Git repository.
- Push the commit from the cloned Git repository to the hosted Git
repository:
git push ssh-origin main