question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot `pip install` SVN dependency with authentication using SVN 1.8+

See original GitHub issue

Environment

  • pip version: 19.0.3
  • Python version: 3.6.7
  • OS: Ubuntu 18.04 x64 LTS

Description

pip Subversion docs

Starting with SVN 1.8, SVN is non-interactive by default. Before that, it will prompt for a password when the user performs a svn checkout.

The problem is that when pip calls out to svn checkout it is not interactive, and will not allow the user to enter their password. One solution is to store SVN passwords, but that may not be allowed by company rules or that may simply not be desirable for security reasons.

For some more context see

The solution seems to be:

  1. If SVN version is <1.8, work as it does now (no extra arguments needed).
  2. If SVN version is >=1.8, add the --force-interactive command line flag.

Some context from svn checkout --help

  --non-interactive        : do no interactive prompting (default is to prompt
                             only if standard input is a terminal device)
  --force-interactive      : do interactive prompting even if standard input
                             is not a terminal device

Perhaps another solution would be to make svn think it’s being called from a terminal device when called from pip?

Using environment variables is another potential option, but it runs into the same fundamental issue: users have to store their password (and in this case in plaintext). This doesn’t seem to be appropriate for user workstations that could be shared.

Subversion versions on popular supported Linux distros:

  • Ubuntu 18.04 LTS: 1.9.7
  • Ubuntu 16.04 LTS: 1.9.3
  • RHEL 7 / CentOS 7: 1.7.14
  • RHEL 6 / CentOS 6: 1.6.11

Expected behavior

On SVN 1.7, 1.8, and 1.9, when pip installs an SVN dependency, it prompts the user for their password if they have not saved it locally.

How to Reproduce

  1. Install Subversion >=1.8.
  • If using Ubuntu 18.04, sudo apt install subversion. svn --version will return 1.9.7.
  1. Make a venv:
$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ pip install pip==19.0.3
  1. Don’t save your SVN password and try to pip install an SVN URL from a URL that requires authentication. pip’s invocation of svn will not prompt for a password, so it will always fail to install.
(venv) $ pip install svn+https://my-svn-server.com/project
Collecting svn+https://my-svn-server.com/project
   Checking out https://my-svn-server.com/project /tmp/pip-req-build-1g_qavb
svn: E170013: Unable to connect to repository at URL 'https://https://my-svn-server.com/project'
svn: E215004: No more credentials or we tried too many times.
Authentication failed.
Command "svn checkout -q https://my-svn-server.com/project /tmp/pip-req-build-1g_qavb" failed with error code 1 in None

References

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:35 (35 by maintainers)

github_iconTop GitHub Comments

2reactions
pfmoorecommented, Apr 7, 2019

It’s worth pointing out that ptys aren’t an option on Windows.

1reaction
cjerdonekcommented, May 26, 2019

Also, the next release will probably happen sometime in July (every 3 months).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install python package from svn using dependency_links in ...
If I run pip install -r requirements.txt, it installs hw2 package successfully. My svn version is. svn, version 1.9.7 (r1800392) compiled Aug 8 ......
Read more >
Apache Subversion 1.14 LTS Release Notes
Reminder: when using the file:// repository access method, the Subversion program is both the client and the server. Upgrading the Working Copy ¶....
Read more >
svn can not be used in MacOS Big Sur 11.0.1 (20B29).
2. I found a solution for Mac with Apple M1. Copy SVN binaries and dylibs from Intel Mac (SVN exists in Command Line...
Read more >
SVN is requesting password too often for realm | Fisheye
Cause. There could be several causes to this issue. Essentially, this problem occurs because Fisheye is using the credentials from the config.
Read more >
Download - SVNKit
SVNKit 1.7.14 is NOT compatible with Subversion 1.8 working copy format. ... threads problem is fixed in Apache SSHD-based support of svn+ssh:// protocol....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found