During a build on Azure DevOps, I'm trying to install a package from a private git repo using tox, but it errors out with
Collecting git+https://****@<company>.visualstudio.com/<team>/_git/<repo_name>@<branch>
Cloning https://****@<company>.visualstudio.com/<team>/_git/<repo_name> (to revision <branch>) to c:\users\vssadm~1\appdata\local\temp\pip-req-build-xpl77xit
Running command git clone -q 'https://****@<company>.visualstudio.com/<team>/_git/<repo_name>' 'C:\Users\VSSADM~1\AppData\Local\Temp\pip-req-build-xpl77xit'
fatal: Cannot prompt because user interactivity has been disabled.
fatal: could not read Password for 'https://$(System.AccessToken)@<company>.visualstudio.com': terminal prompts disabled
The tox.ini is setup with
passenv = *
deps =
git+https://$(System.AccessToken)@<company>.visualstudio.com/<team>/_git/<repo_name>@<branch>
I've ensured that the Azure DevOps build agent user has read permissions on the <repo_name> repository and that the "Allow script to access the OAuth token" is checked.
When I create a script task to simply run pip install git+https://$(System.AccessToken)@<company>.visualstudio.com/<team>/_git/<repo_name>@<branch>
it successfully installs.
Is there a way for to use $(System.AccessToken)
with tox?