jenkins-x/jx

(jx promote) --git-user flag is nonfunctional

roulettedares opened this issue · 0 comments

on a runner where ~/.git-credentials does not exist and git config --global credential.helper store is not manually run, this command

 jx promote -b --all --timeout 1h --no-poll --add-changelog ../changelog.md \
    --git-user "my-botzzz" \
    --git-token $GITHUB_TOKEN

fails and prompts for a username:

about to run: git clone https://github.com/my-org/gitops-dev /tmp/jx-git-2818598956 in dir /tmp
Username for 'https://github.com':

i would expect that jx promote would respect some combination of cli flags and/or env vars:

        export GIT_USER=x-access-token
        export GIT_USERNAME=x-access-token
        export GITHUB_USER=x-access-token
        export GITHUB_USERNAME=x-access-token
        export GH_USERNAME=x-access-token
        export GITHUB_TOKEN=xyz
        export GIT_TOKEN=xyz
        export GH_TOKEN=xyz

but none of them work

as a side note, i also tried creating ~/git/credentials with no success. based on the logic in jx-helpers, i would also expect this to work