3

I'm trying to install a package via Pipfile from a private repo.

Using the following syntax, VScode is asking for a password (in console it is locking forever), although my token is exported to my env variables:

[packages]
pack1 = {editable = true, git = "https://${ACCESS_TOKEN}@github.com/.../pack1.git"}

Using the ACCESS_TOKEN directly it works like expected:

[packages]
pack1 = {editable = true, git = "https://myToken@github.com/.../pack1.git"}

Using pipenv install command works also fine with my environment variable (ACCESS_TOKEN):

pipenv install -e git+https://${ACCESS_TOKEN}@github.com/.../pack1.git

Do you have any ideas how to solve it?

Thanks!

julste
  • 313
  • 3
  • 10
  • Where exactly did you set the env var `ACCESS_TOKEN`? How exactly did you export it? VS Code just uses your OS's underlying terminal, so if the terminal config has an exported ACCESS_TOKEN, so VS Code should be able to find it. – Gino Mempin Dec 31 '20 at 03:44
  • It is also not clear what "*it is locking forever*" means. If the git URL is not valid, the `pipenv install` command would eventually fail (might take some time, but certainly not "forever"). – Gino Mempin Dec 31 '20 at 03:46

1 Answers1

3

This is likely due to your pipenv version not supporting env-var expansion in the requirements (packages) section (see this issue). This was fixed in pipenv version 2020.11.15.

I had this exact problem with an older version and indeed upgrading pipenv to 2020.11.15 made it work.

avivr
  • 1,393
  • 15
  • 28