If HTTPS URLS are provided in the format
then strip out username/password and pass to JGit UsernamePasswordCredentialsProvider
Otherwise, add default of NetRCCredentialsProvider which looks for a netrc file which looks for ~/.netrc and then ~/_netrc with the format:
JGit is supposed to support these auth methods over HTTP but that seems unwise, so CommandBox will not use any auth for HTTP URLs right now.
Github personal access tokens can be specified as either
or just the personal access token like
and they both appear to work the same.
It appears that a private Github repo requires the “repo” scope selected for the personal access token.
GitLab seems to want a username, but it doesn’t seem to matter what the username is.
You can use environment variables from the CLI or in your box.json
But remember, the token will be visible in the output of the build logs.