Set up proxy repo with embedded credentials in URL?

Hi,

I would like to set up proxy repos for my users (PyPi, Maven, and npm data), but the upstream source server only makes the repos available via URLs with embedded credentials, i.e.:

https://<user>:<token>@server.domain/api/pypi/simple

If I put the URL that I am given in to the Nexus Create a Repository page, it gives me an error about an invalid URL when I try to save the page.

I also tried putting the user/token down in the HTTP authentication section of the Create a Repository page. That let me save the page, but I was unable to use pip to download anything through the Nexus repo.

I’m not thrilled with having to use the user:token URLs to access the upstream server, but I do not have a choice in the matter.

Is using the user:token URL possible? Or is there some other way to do this?

Thanks.

Hi Chad,

Its been a long time since I’ve seen credentials embedded in a URL, I did some experiments with a web browser locally and it appears at least there to simply be translated into a basic authentication header. The only thought I have is that perhaps the remote expects preemptive authentication and does not issue an authentication challenge.

If you’re a customer of Nexus Repository Pro, you could have one of your support contacts create a support ticket.

I think I have this figured out….

I ended up putting the and in the HTTP Authentication section of the repo setup, had to add the server to the “no proxy” list, and (probably most important) had to get my pip.conf set up correctly:

[global]
index = https://server.domain/repository/pypi/pypi
index-url = https://server.domain/repository/pypi/simple