Setting up your repository - RedHatInsights/red-hat-ansible-automation-platform-documentation GitHub Wiki
Before you begin:
-
You must have a GitHub account.
-
You must have set up an SSH key for your GitHub account.
If you also want to interact with the AAP Gitlab repository, these extra prerequisites apply:
-
You must be connected to the VPN
-
You must be a member of the Documentation - CCS Internal group in Gitlab
-
You must be able to open the Gitlab repo in a browser: https://gitlab.cee.redhat.com/red-hat-cloud-services-software-documentation/red-hat-ansible-automation-platform-documentation
-
You must have set up an SSH key for your GitHub account.
-
Fork the upstream repository to create a copy in your own GutHub account.
From the main page of the GitHub repository, click Fork in the upper right corner.
-
Open a terminal on your machine and navigate to the directory where you want to store your local copy of the repository.
-
Clone the forked repository locally.
$ git clone [email protected]:<your_github_username>/red-hat-ansible-automation-platform-documentation.git
-
The
git clone
command copies the forked repository from your account on the GitHub server into a directory calledred-hat-ansible-automation-platform-documentation
on your local machine. -
It sets your forked repository as a git remote called
origin
.If the command fails, be sure that you have set up an SSH key for GitHub.
-
-
In a terminal, navigate to the
red-hat-ansible-automation-platform-documentation
directory. -
Set the upstream remote repository. This configures a connection labeled
upstream
between your local cloned repository and the remote upstream repository on GitHub.$ git remote add -f upstream [email protected]:RedHatInsights/red-hat-ansible-automation-platform-documentation.git
-
If you need to interact with the AAP Gitlab repository, configure a remote repository called
gitlab
:$ git remote add gitlab [email protected]:red-hat-cloud-services-software-documentation/red-hat-ansible-automation-platform-documentation.git
Check that you have correctly configured your connections to the remote git repositories.
$ git remote -v gitlab [email protected]:red-hat-cloud-services-software-documentation/red-hat-ansible-automation-platform-documentation.git (fetch) gitlab [email protected]:red-hat-cloud-services-software-documentation/red-hat-ansible-automation-platform-documentation.git (push) origin [email protected]:ariordan-redhat/red-hat-ansible-automation-platform-documentation.git (fetch) origin [email protected]:ariordan-redhat/red-hat-ansible-automation-platform-documentation.git (push) upstream [email protected]:RedHatInsights/red-hat-ansible-automation-platform-documentation.git (fetch) upstream [email protected]:RedHatInsights/red-hat-ansible-automation-platform-documentation.git (push)
To verify that you can access the git remotes, fetch the latest updates from upstream, and view the latest commits in the remotes.
$ git fetch upstream $ git log --oneline -n 2 upstream/main 7c3291d (HEAD -> main, upstream/main, origin/main, origin/HEAD) Update roles and collections content in dev guide (#142) f34322a First draft of operator install procedures (#154) $ git log --oneline -n 2 origin/main 7c3291d (HEAD -> main, upstream/main, origin/main, origin/HEAD) Update roles and collections content in dev guide (#142) f34322a First draft of operator install procedures (#154) $ git log --oneline -n 2 gitlab/2.1 0329655 (upstream/2.1, gitlab/2.1) AAP-2029: Fixed sentences (#291) 0a93b45 AAP-2328 Configuring external database for hub/controller on a AAP operator (#288) (#289) be3d6ec AAP-2853 Update Providing feedback info (#285) (#286)