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

New command cargoLogin to login in all cargo registries #153

Merged
merged 13 commits into from
Feb 27, 2024

Conversation

qsantos
Copy link
Contributor

@qsantos qsantos commented Dec 21, 2023

It seems to work locally. Hopefully, it will also work in the CI.

@qsantos qsantos changed the title cargoSyncConfig logins in all cargo registries New command cargoLogin to login in all cargo registries Dec 27, 2023
@daladim
Copy link
Contributor

daladim commented Dec 29, 2023

Notes after a call: we should make sure this MR

  • starts the MITM proxy (which is still required, can be disabled later)
  • configures cargo to use this proxy
  • configures cargo to be aware it is authenticated to a registry (otherwise we would hit a no token found for 'whatever-registry-here' error, even if kraken is using the proxy, as it looks kraken does not even attempt a request when it does not know the token)

@qsantos
Copy link
Contributor Author

qsantos commented Jan 11, 2024

@daladim

Notes after a call: we should make sure this MR

* starts the MITM proxy (which is still required, can be disabled later)

* configures cargo to use this proxy

* configures cargo to be aware it is authenticated to a registry (otherwise we would hit a `no token found for 'whatever-registry-here'` error, even if kraken is using the proxy, as it looks kraken does not even attempt a request when it does not know the token)

Regarding the first two points, this MR does not touch CargoAuthProxyTask, is that enough?

For the last point, this is what #140 did, by adding cargo:token as a dummy global-credential-providers to convince Cargo to still attempt the request. This MR only adds more global-credential-providers, so it should still work.

@NiklasRosenstein
Copy link
Contributor

I've only tested this marginally -- we really need some end-to-end tests that include a sparse and private registry. @Colin1860 recently added a test with https://github.com/d-e-s-o/cargo-http-registry but it's (1) not sparse and (2) accepts and credentials. I'm gonna go ahead with merging this anyway to unblock us integrating it into our internal extension module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants