Open Megan-Wright opened 4 years ago
Still seeing this happening any time the git repo url or access token is incorrect in a promote command - I've narrowed it down to coming from the execGit
function in https://github.com/rhd-gitops-example/services/blob/master/pkg/git/repository.go but can't figure out how to remove the access token from here.
I wonder if we should remove the authentication from the URLs that we use as the remotes, and figure out an alternative way to authenticate the Git interactions.
Expected behaviour
Once I have set my access token using
export GITHUB_TOKEN=foo
I should not every see my access token displayed while running promote commandsActual behaviour
Access tokens are displayed within github urls in errors when using the
--debug
flag, e.g:Steps to Reproduce
Run a promote command which will fail with
--debug
set. There are two cases I have noticed the access token being surfaced: