mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-11 20:05:25 +00:00
Add write to netrc for gitlab credential
This commit is contained in:
parent
ac3e8313b3
commit
8a94732296
2 changed files with 7 additions and 1 deletions
|
|
@ -3,7 +3,7 @@
|
|||
"Configs": [
|
||||
{
|
||||
"Type": "github",
|
||||
"GitHubUser": "TaqlaAI"
|
||||
"GitHubOrg": "TaqlaAI"
|
||||
},
|
||||
{
|
||||
"Type": "gitlab",
|
||||
|
|
|
|||
|
|
@ -17,6 +17,12 @@ fi
|
|||
if [ -n "$GITLAB_TOKEN" ]; then
|
||||
echo "$GITLAB_TOKEN" > "$HOME/.gitlab-token"
|
||||
chmod 600 "$HOME/.gitlab-token"
|
||||
|
||||
# Configure Git with the provided GITLAB_TOKEN
|
||||
echo "machine gitlab.com
|
||||
login oauth
|
||||
password ${GITLAB_TOKEN}" > "$HOME/.netrc"
|
||||
chmod 600 "$HOME/.netrc"
|
||||
else
|
||||
echo -e "\e[33mWarning: GitLab repositories will not be indexed since GITLAB_TOKEN was not set. If you are not using GitLab, disregard.\e[0m"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue