0

I'm installing a private python package that is dependent on another python package on a private git repository on a local server.

In my setup.py I use the following:

name = packageToBeInstalled
install_requires=[
   'packageRequired @ git+url_of_repo_on_internal_server/packageRequired.git'

I install the packageToBeInstalled as follows:

pip install -e path_to_setup_of_package_to_be_installed -v

This command tries to clone the packageRequired from its repository to the temp folder, but it gets stuck at

Cloning into 'path_to_temp\pip-install-psyyz99k_\packageRequired_lotOfNumbers'...

If I do the same, but before I store or chache the credentials

git config --global credential.helper 'cache --timeout=300'

and I force to promt the credentials with e.g a pull to the repository, it works fine.

Why I am not prompted for the credentials when they are not cached?

  • `pip` redirects stdin/stdout/stderr streams for all underline programs it runs so Git cannot ask password on the terminal. There're many ways to work around: 1) preload credentials into credential cache; 2) use SSH protocol, SSH key pair and `ssh-agent`; 3) configure Git to use graphical program to ask for password; 4) use SSH protocol and a graphical program to ask for password or key passphrase. – phd Sep 28 '22 at 10:19

0 Answers0