From 1dcabdbe72c3ce6ed87fa842a39fa06af0a234e1 Mon Sep 17 00:00:00 2001 From: Mani Marothu Date: Thu, 3 Oct 2024 13:55:22 -0700 Subject: [PATCH] Updated --- cicd/get-credentials.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/cicd/get-credentials.sh b/cicd/get-credentials.sh index 9f6de39..120d011 100755 --- a/cicd/get-credentials.sh +++ b/cicd/get-credentials.sh @@ -25,4 +25,18 @@ Gitea Password: ${gitea_password} EOF -echo "credentials.txt file created with ArgoCD details." \ No newline at end of file +echo "credentials.txt file created with ArgoCD details." + +# Setting up gitconfig +git config --global user.name "CNOE" +git config --global user.email "cnoe@io" + +GITEA_PAT=$(kubectl get secret gitea-token -n gitea -o jsonpath='{.data.token}' | base64 -d) +GIT_CREDS="$HOME/.git-credentials" +cat > $GIT_CREDS << EOT +https://giteaAdmin:${GITEA_PAT}@${IDE_DOMAIN}/gitea +EOT + +git config --global credential.helper 'store' + +echo "Git config update completed." \ No newline at end of file