Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a local hackage mirror with HTTP Auth stopped working in 2.0 #4743

Closed
zeha opened this issue Sep 5, 2017 · 4 comments
Closed

Using a local hackage mirror with HTTP Auth stopped working in 2.0 #4743

zeha opened this issue Sep 5, 2017 · 4 comments

Comments

@zeha
Copy link

zeha commented Sep 5, 2017

In previous versions (verified with cabal-install 1.22.6.0 library 1.22.5.0, but pretty sure also with some 1.24.x), this worked:

% grep hackage ~/.cabal/config 
repository hackage.haskell.org
  url: http://build:xxxxxxxxxxxxxxxx@nexus.namespace.at/nexus/repository/hackage-all/

With cabal-install 2.0.0.0 library 2.0.0.2, on OS X, the various cabal commands now fail with:

Warning: No mirrors found for
http://build:...@nexus.namespace.at/nexus/repository/hackage-all/
Unexpected response 401for http://build:...@nexus.namespace.at/nexus/repository/hackage-all/root.json

A quick tcpdump reveals that build:... is not just for display purposes, but actually gets sent in the HTTP request!

	GET /nexus/repository/hackage-all/root.json HTTP/1.1
	Host: nexus.namespace.at
	Authorization: Basic YnVpbGQ6Li4u
	User-Agent: cabal-install/2.0.0.0 (osx; x86_64)
	Accept: */*
	Cache-Control: no-transform

Note that YnVpbGQ6Li4u decodes to build:....

@phadej
Copy link
Collaborator

phadej commented Sep 5, 2017

To clarify, build:... is the actual contents of YnVpbGQ6Li4u, but we should encode the password, i.e. xxxxxxxxxxxxxxxx. Shouldn't be hard to fix.

@zeha
Copy link
Author

zeha commented Sep 5, 2017

Yes. Sorry that wasn't clear enough :-)

@hvr
Copy link
Member

hvr commented Sep 5, 2017

@gbaz
Copy link
Collaborator

gbaz commented Sep 10, 2021

resolved by above.

@gbaz gbaz closed this as completed Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants