Skip to content

Commit c55115f

Browse files
authored
Merge pull request #1536 from StatCan/gitlab-docs
chore: update gitlab documentation
2 parents e95d7d7 + 3fd97a9 commit c55115f

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

docs/en/6-Gitlab/Gitlab.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
![image](https://user-images.githubusercontent.com/23174198/217059855-1ea17aba-d722-467e-96f4-0a37eda3f035.png)
2+
3+
Thankfully, using the cloud main gitlab on the AAW is just like how you would regularly use git.
4+
5+
### Step 1: Locate the Git repo you want to clone and copy the clone with HTTPS option
6+
If your repository is private, you will need to also do Step 4 (Creating a Personal Access Token) for this to go through.
7+
For me this was a test repo
8+
![image](https://user-images.githubusercontent.com/23174198/217060353-ba229ced-b5c1-4eae-8878-9608835cc65f.png)
9+
10+
### Step 2: Paste the copied link into one of your workspace servers
11+
![image](https://user-images.githubusercontent.com/23174198/217060697-535df6c1-d9bb-4bc3-a42b-9f085a5386d5.png)
12+
13+
### Step 3: Success!
14+
As seen in the above screenshot I have cloned the repo!
15+
16+
### Step 4: Create a Personal Access Token for pushing (also used if pulling from a private repository)
17+
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-)
18+
19+
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`
20+
![image](https://user-images.githubusercontent.com/23174198/217061060-122dded8-dc80-46ce-a907-a85913cf5dd7.png)
21+
Follow the prompts entering the name, the token expiration date and granting the token permissions (I granted `write_repository`)
22+
23+
### Step 5: Personalize `Git` to be you
24+
Run `git config user.email ....` and `git config user.name ...` to match your gitlab identity.
25+
26+
### Step 6: Supply the Generated Token when asked for your password
27+
The token will by copy-able at the top once you hit `Create personal access token` at the bottom
28+
![image](https://user-images.githubusercontent.com/23174198/217062846-03a715f1-ded5-4d80-ad4b-c647ae5e30fd.png)
29+
30+
Once you have prepared everything it's time
31+
![image](https://user-images.githubusercontent.com/23174198/217063198-c1bd6c3a-ebc5-444d-98ba-24ef32faa20e.png)
32+
33+
### Step 7: See the results of your hard work in gitlab
34+
![image](https://user-images.githubusercontent.com/23174198/217063990-efaa8e81-a0eb-4b6d-842e-2ca3112bb4f7.png)
35+

mkdocs-en.yml

+2
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,6 @@ nav:
6565
- Overview: 5-Storage/Overview.md
6666
- Disks: 5-Storage/Disks.md
6767
- MinIO: 5-Storage/MinIO.md
68+
- Gitlab:
69+
- Gitlab: 6-Gitlab/Gitlab.md
6870
- Help/Contact: Help.md

0 commit comments

Comments
 (0)