mirror of
https://github.com/tektoncd/catalog.git
synced 2024-11-24 06:15:46 +00:00
Make directory safe only right before the git-init
We were doing first but when having a WORKSPACE_BASIC_AUTH_DIRECTORY_BOUND we would erase the .gitconfig and that safe variable would not be there anymore. Do this only right before calling the git-init so we know the setting would be applied. Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
This commit is contained in:
parent
3ca962e11d
commit
b87c119eca
@ -174,8 +174,6 @@ spec:
|
||||
set -x
|
||||
fi
|
||||
|
||||
git config --global --add safe.directory "${WORKSPACE_OUTPUT_PATH}"
|
||||
|
||||
if [ "${WORKSPACE_BASIC_AUTH_DIRECTORY_BOUND}" = "true" ] ; then
|
||||
cp "${WORKSPACE_BASIC_AUTH_DIRECTORY_PATH}/.git-credentials" "${PARAM_USER_HOME}/.git-credentials"
|
||||
cp "${WORKSPACE_BASIC_AUTH_DIRECTORY_PATH}/.gitconfig" "${PARAM_USER_HOME}/.gitconfig"
|
||||
@ -220,6 +218,7 @@ spec:
|
||||
test -z "${PARAM_HTTPS_PROXY}" || export HTTPS_PROXY="${PARAM_HTTPS_PROXY}"
|
||||
test -z "${PARAM_NO_PROXY}" || export NO_PROXY="${PARAM_NO_PROXY}"
|
||||
|
||||
git config --global --add safe.directory "${WORKSPACE_OUTPUT_PATH}"
|
||||
/ko-app/git-init \
|
||||
-url="${PARAM_URL}" \
|
||||
-revision="${PARAM_REVISION}" \
|
||||
|
Loading…
Reference in New Issue
Block a user