Recommended approach for accessing private git repo which is compatible with local builds via the CLI



Edited the original post to keep it a bit more succinct

I’m looking for a method to access a private git repo that’s compatible with the local build tool.

Essentially I’d like to have a step similar to the following:

run: git clone

Which will run successfully on the server and locally

Any help or direction much appreciated :slight_smile:


Approach I’m going with for now is to create a git_user which has access (only) to my git-repo
I can then pass down a git ‘personal access token’ for git_user via an environment variable and expose that same token on the circle server

circleci build -e GIT_A_TOKEN=$GIT_A_TOKEN

Now my checkout step

git clone https://$

works locally and on the server


This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.