git config --global credential.https://gitlab.sig-gis.com.useHttpPath true git config --global credential.https://gitlab.sig-gis.com.helper store
After running these commands, changes should be observable in `~/.gitconfig`.
This can be done by visiting the "Access Tokens" subsection of your repository settings. The token you create should be made at Reporter level, with the `read_api` and `read_repository` scopes.
After creating your token, you can store it on your deployment machine as the `sig-app` user with a command of this shape.
echo -e "url=https://sig-app:$TOKEN@gitlab.sig-gis.com/sig-gis/$REPO.git\n" | git credential approve
At this point, your credentials should be recorded in `~/.git-credentials`.
After configuring your access token, you should now be able to clone your private repository over HTTP.
git clone https://gitlab.sig-gis.com/sig-gis/$REPO.git
I have written a short bash script that can be placed on a remote server to automate this process. It depends on the `jq` tool.
This can be saved as `install-tokens.sh` on a remote server. Below is an example of how to use it.
./install-tokens.sh matryoshka cljcall runway-scripts