From f6c494d2324c3a1129d61b7faeb9cbdbe3c11151 Mon Sep 17 00:00:00 2001 From: tarik56 Date: Wed, 14 May 2025 13:11:13 +0200 Subject: [PATCH 1/3] Adjust gitlab origin repo url setup to include user and PAT --- docs/1-the-manual-menace/3-ubiquitous-journey.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/1-the-manual-menace/3-ubiquitous-journey.md b/docs/1-the-manual-menace/3-ubiquitous-journey.md index e9a94fdc..a542c510 100644 --- a/docs/1-the-manual-menace/3-ubiquitous-journey.md +++ b/docs/1-the-manual-menace/3-ubiquitous-journey.md @@ -80,7 +80,7 @@ All of these traits lead to one outcome - the ability to build and release quali ```bash#test cd /projects/tech-exercise - git remote set-url origin https://${GIT_SERVER}/${TEAM_NAME}/tech-exercise.git + git remote set-url origin https://${GITLAB_USER}:${GITLAB_PAT}@${GIT_SERVER}/${TEAM_NAME}/tech-exercise.git ``` Use the `GITLAB_PAT` from above when you are prompted for the password (this will be cached) From 6f5e7fdd96809f082d5b81b2238939ee9695f1be Mon Sep 17 00:00:00 2001 From: tarik56 Date: Wed, 14 May 2025 13:17:39 +0200 Subject: [PATCH 2/3] Remove hint to use PAT as password --- docs/1-the-manual-menace/3-ubiquitous-journey.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/1-the-manual-menace/3-ubiquitous-journey.md b/docs/1-the-manual-menace/3-ubiquitous-journey.md index a542c510..f85a8622 100644 --- a/docs/1-the-manual-menace/3-ubiquitous-journey.md +++ b/docs/1-the-manual-menace/3-ubiquitous-journey.md @@ -83,8 +83,6 @@ All of these traits lead to one outcome - the ability to build and release quali git remote set-url origin https://${GITLAB_USER}:${GITLAB_PAT}@${GIT_SERVER}/${TEAM_NAME}/tech-exercise.git ``` - Use the `GITLAB_PAT` from above when you are prompted for the password (this will be cached) - ```bash#test cd /projects/tech-exercise git add . From e28ac2796ea8fda76ded5c810947367e0c1e987f Mon Sep 17 00:00:00 2001 From: tarik56 Date: Wed, 14 May 2025 13:44:57 +0200 Subject: [PATCH 3/3] Adjusted all git remote set origin urls to include PAT --- docs/1-the-manual-menace/3-ubiquitous-journey.md | 3 ++- docs/1-the-manual-menace/4-extend-uj.md | 2 +- docs/1-the-manual-menace/5-this-is-gitops.md | 2 +- docs/2-attack-of-the-pipelines/1-sealed-secrets.md | 2 +- docs/2-attack-of-the-pipelines/3-the-pipelines.md | 2 +- docs/2-attack-of-the-pipelines/3a-jenkins.md | 2 +- docs/2-attack-of-the-pipelines/3b-tekton.md | 2 +- docs/2-attack-of-the-pipelines/3c-create-new-group.md | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/1-the-manual-menace/3-ubiquitous-journey.md b/docs/1-the-manual-menace/3-ubiquitous-journey.md index f85a8622..74b3046c 100644 --- a/docs/1-the-manual-menace/3-ubiquitous-journey.md +++ b/docs/1-the-manual-menace/3-ubiquitous-journey.md @@ -67,8 +67,9 @@ All of these traits lead to one outcome - the ability to build and release quali echo $GITLAB_PAT ``` - ..and lets persist it for now: + ..and lets persist your Username and Token for now: ```bash + echo "export GITLAB_USER=${GITLAB_USER}" | tee -a ~/.bashrc -a ~/.zshrc echo "export GITLAB_PAT=${GITLAB_PAT}" | tee -a ~/.bashrc -a ~/.zshrc ``` diff --git a/docs/1-the-manual-menace/4-extend-uj.md b/docs/1-the-manual-menace/4-extend-uj.md index cfda4b5b..0e7eddbb 100644 --- a/docs/1-the-manual-menace/4-extend-uj.md +++ b/docs/1-the-manual-menace/4-extend-uj.md @@ -7,7 +7,7 @@ Now, we have our projects, necessary rolebindings and Jenkins up and running. We ```bash cd /projects/tech-exercise -git remote set-url origin https:////tech-exercise.git +git remote set-url origin https://${GITLAB_USER}:${GITLAB_PAT}@${GIT_SERVER}/${TEAM_NAME}/tech-exercise.git git pull ``` diff --git a/docs/1-the-manual-menace/5-this-is-gitops.md b/docs/1-the-manual-menace/5-this-is-gitops.md index 7204f78e..3100aaf3 100644 --- a/docs/1-the-manual-menace/5-this-is-gitops.md +++ b/docs/1-the-manual-menace/5-this-is-gitops.md @@ -7,7 +7,7 @@ ```bash cd /projects/tech-exercise -git remote set-url origin https://${GIT_SERVER}/${TEAM_NAME}/tech-exercise.git +git remote set-url origin https://${GITLAB_USER}:${GITLAB_PAT}@${GIT_SERVER}/${TEAM_NAME}/tech-exercise.git git pull ``` diff --git a/docs/2-attack-of-the-pipelines/1-sealed-secrets.md b/docs/2-attack-of-the-pipelines/1-sealed-secrets.md index 4eb5a4f1..320a4ca3 100644 --- a/docs/2-attack-of-the-pipelines/1-sealed-secrets.md +++ b/docs/2-attack-of-the-pipelines/1-sealed-secrets.md @@ -10,7 +10,7 @@ Sealed Secrets allows us to _seal_ Kubernetes secrets by using a utility called ```bash cd /projects/tech-exercise -git remote set-url origin https://${GIT_SERVER}/${TEAM_NAME}/tech-exercise.git +git remote set-url origin https://${GITLAB_USER}:${GITLAB_PAT}@${GIT_SERVER}/${TEAM_NAME}/tech-exercise.git git pull ``` diff --git a/docs/2-attack-of-the-pipelines/3-the-pipelines.md b/docs/2-attack-of-the-pipelines/3-the-pipelines.md index 37d523d4..a09dfe7e 100644 --- a/docs/2-attack-of-the-pipelines/3-the-pipelines.md +++ b/docs/2-attack-of-the-pipelines/3-the-pipelines.md @@ -17,7 +17,7 @@ Why creating pipelines: ```bash cd /projects/tech-exercise -git remote set-url origin https://${GIT_SERVER}/${TEAM_NAME}/tech-exercise.git +git remote set-url origin https://${GITLAB_USER}:${GITLAB_PAT}@${GIT_SERVER}/${TEAM_NAME}/tech-exercise.git git pull ``` diff --git a/docs/2-attack-of-the-pipelines/3a-jenkins.md b/docs/2-attack-of-the-pipelines/3a-jenkins.md index 54bf4c7d..8a560216 100644 --- a/docs/2-attack-of-the-pipelines/3a-jenkins.md +++ b/docs/2-attack-of-the-pipelines/3a-jenkins.md @@ -39,7 +39,7 @@ git push ```bash#test cd /projects git clone https://github.com/rht-labs/pet-battle.git && cd pet-battle - git remote set-url origin https://${GIT_SERVER}/${TEAM_NAME}/pet-battle.git + git remote set-url origin https://${GITLAB_USER}:${GITLAB_PAT}@${GIT_SERVER}/${TEAM_NAME}/pet-battle.git git branch -M main git push -u origin main ``` diff --git a/docs/2-attack-of-the-pipelines/3b-tekton.md b/docs/2-attack-of-the-pipelines/3b-tekton.md index 69e78845..5ef8335e 100644 --- a/docs/2-attack-of-the-pipelines/3b-tekton.md +++ b/docs/2-attack-of-the-pipelines/3b-tekton.md @@ -25,7 +25,7 @@ In this snippet of the pipeline used in this exercise, we define: ```bash#test cd /projects git clone https://github.com/rht-labs/pet-battle-api.git && cd pet-battle-api - git remote set-url origin https://${GIT_SERVER}/${TEAM_NAME}/pet-battle-api.git + git remote set-url origin https://${GITLAB_USER}:${GITLAB_PAT}@${GIT_SERVER}/${TEAM_NAME}/pet-battle-api.git git branch -M main git push -u origin main ``` diff --git a/docs/2-attack-of-the-pipelines/3c-create-new-group.md b/docs/2-attack-of-the-pipelines/3c-create-new-group.md index a93e0d2a..cde4f4b9 100644 --- a/docs/2-attack-of-the-pipelines/3c-create-new-group.md +++ b/docs/2-attack-of-the-pipelines/3c-create-new-group.md @@ -103,7 +103,7 @@ team will be easy following the next instructions. ```bash#test cd /projects/tech-exercise - git remote set-url origin https://${GIT_SERVER}/${TEAM_NAME}/tech-exercise.git + git remote set-url origin https://${GITLAB_USER}:${GITLAB_PAT}@${GIT_SERVER}/${TEAM_NAME}/tech-exercise.git git pull ```