Skip to content
Snippets Groups Projects
Verified Commit f6669090 authored by m1mir's avatar m1mir
Browse files

Disbled line wrapping in Harbor example base64 command

Disabled the line wrapping in encoding of the credentials.
The default behavior of the base64 command is wrapping after 76 chars.
If the credential is longer than that it causes the following error
during the next command.

/kaniko/.docker/config.json: invalid character '\n' in string literal
parent aa74a0a3
No related branches found
No related tags found
2 merge requests!170053Security patch upgrade alert: Only expose to admins 17-4,!166717Disbled line wrapping in Harbor example base64 command
......@@ -75,7 +75,7 @@ docker:
entrypoint: ['']
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${HARBOR_HOST}\":{\"auth\":\"$(echo -n ${HARBOR_USERNAME}:${HARBOR_PASSWORD} | base64)\"}}}" > /kaniko/.docker/config.json
- echo "{\"auths\":{\"${HARBOR_HOST}\":{\"auth\":\"$(echo -n ${HARBOR_USERNAME}:${HARBOR_PASSWORD} | base64 -w 0)\"}}}" > /kaniko/.docker/config.json
- >-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
......
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