-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1536 from StatCan/gitlab-docs
chore: update gitlab documentation
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
![image](https://user-images.githubusercontent.com/23174198/217059855-1ea17aba-d722-467e-96f4-0a37eda3f035.png) | ||
|
||
Thankfully, using the cloud main gitlab on the AAW is just like how you would regularly use git. | ||
|
||
### Step 1: Locate the Git repo you want to clone and copy the clone with HTTPS option | ||
If your repository is private, you will need to also do Step 4 (Creating a Personal Access Token) for this to go through. | ||
For me this was a test repo | ||
![image](https://user-images.githubusercontent.com/23174198/217060353-ba229ced-b5c1-4eae-8878-9608835cc65f.png) | ||
|
||
### Step 2: Paste the copied link into one of your workspace servers | ||
![image](https://user-images.githubusercontent.com/23174198/217060697-535df6c1-d9bb-4bc3-a42b-9f085a5386d5.png) | ||
|
||
### Step 3: Success! | ||
As seen in the above screenshot I have cloned the repo! | ||
|
||
### Step 4: Create a Personal Access Token for pushing (also used if pulling from a private repository) | ||
If you try to `git push ....` you will encounter an error eventually leading you to the [gitlab help documentation](https://gitlab.k8s.cloud.statcan.ca/help/user/profile/account/two_factor_authentication.md#error-http-basic-access-denied-the-provided-password-or-token-) | ||
|
||
You will need to make a Personal Access Token for this. To achieve this go in gitlab, click your profile icon and then hit `Preferences` and then `Access Tokens` | ||
![image](https://user-images.githubusercontent.com/23174198/217061060-122dded8-dc80-46ce-a907-a85913cf5dd7.png) | ||
Follow the prompts entering the name, the token expiration date and granting the token permissions (I granted `write_repository`) | ||
|
||
### Step 5: Personalize `Git` to be you | ||
Run `git config user.email ....` and `git config user.name ...` to match your gitlab identity. | ||
|
||
### Step 6: Supply the Generated Token when asked for your password | ||
The token will by copy-able at the top once you hit `Create personal access token` at the bottom | ||
![image](https://user-images.githubusercontent.com/23174198/217062846-03a715f1-ded5-4d80-ad4b-c647ae5e30fd.png) | ||
|
||
Once you have prepared everything it's time | ||
![image](https://user-images.githubusercontent.com/23174198/217063198-c1bd6c3a-ebc5-444d-98ba-24ef32faa20e.png) | ||
|
||
### Step 7: See the results of your hard work in gitlab | ||
![image](https://user-images.githubusercontent.com/23174198/217063990-efaa8e81-a0eb-4b6d-842e-2ca3112bb4f7.png) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters