mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-14 05:15:19 +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": [
|
"Configs": [
|
||||||
{
|
{
|
||||||
"Type": "github",
|
"Type": "github",
|
||||||
"GitHubUser": "TaqlaAI"
|
"GitHubOrg": "TaqlaAI"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Type": "gitlab",
|
"Type": "gitlab",
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,12 @@ fi
|
||||||
if [ -n "$GITLAB_TOKEN" ]; then
|
if [ -n "$GITLAB_TOKEN" ]; then
|
||||||
echo "$GITLAB_TOKEN" > "$HOME/.gitlab-token"
|
echo "$GITLAB_TOKEN" > "$HOME/.gitlab-token"
|
||||||
chmod 600 "$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
|
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"
|
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
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue