Skip to content
Snippets Groups Projects
Verified Commit 06958376 authored by Levente Polyak's avatar Levente Polyak :rocket:
Browse files

fix(db-functions): avoid git asking for credentials for unknown repos

Use GIT_TERMINAL_PROMPT=0 to enforce Git not asking for any prompts or
credentials. GitLab does not return none existing repositories but
instead prompts for credentials to avoid side channel information leaks.
However, we explicitly do not want to get any such prompts, instead we
fail gracefully.
parent 6b98897c
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,10 @@ fetch_pkgbuild() {
project_path=$(gitlab_project_name_to_path "${pkgbase}")
src="${GIT_PACKAGING_REPOS_URL}/${project_path}.git"
target="${GIT_PACKAGES_CACHE}/${pkgbase}"
# avoid git operations asking for terminal input
export GIT_TERMINAL_PROMPT=0
if [[ ! -d $target ]]; then
if ! arch_git -c core.sharedRepository=group clone --origin origin --bare --mirror "${src}" "${target}"; then
return 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment