checkout private repositories with local jobs run through circleci cli

Essentially, in this case, you'll need to pass some form of credentials into the container. You could set your VCS username/password as environment variables and inject them into the container which would allow you to clone the repo with basic auth. Or you could base64 encode the private key and pass it into the job as en envar as well, and then you can decode it to a file within a run command in your custom local config. Once decoded to a file you can ssh-add -K path/to/key and this should allow you access to the remote repo.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.