Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Support for private registries #182

Open
lapastillaroja opened this issue Jan 11, 2023 · 5 comments · Fixed by BarbossHack/crates-io#2
Open

Support for private registries #182

lapastillaroja opened this issue Jan 11, 2023 · 5 comments · Fixed by BarbossHack/crates-io#2

Comments

@lapastillaroja
Copy link

Is your feature request related to a problem? Please describe.
Support for private registries

Describe the solution you'd like
Our team uses a private Artifactory cargo repository for internal projects. It's configured using cargo's standard configuration

# path: .cargo/config.toml
[registries]
privaterepo = { index = "https://DOMAIN/artifactory/git/NAMESPACE.git" }

However the extension doesn't recognize it and shows an error.
Standard cargo commands works.

Describe alternatives you've considered
None yet

Additional context

@zifik
Copy link

zifik commented Feb 6, 2023

I'm experiencing this same issue

config.toml

[registries.private]  
index = "https://crates.mydomain.com/git/index"

[registry]
default = "private" 

Cargo.toml

custom-dep = { version = "0.1.1", registry = "private"}

I get the following error via the tooltip:
Error: Command failed: git --no-pager --git-dir="/usr/local/cargo/registry/index/github.com-1ecc6299db9ec823/.git"

When I ls on /usr/local/cargo/registry/index/, I see my private registry in there. So for some reason this extension is using the wrong path.

@serayuzgur
Copy link
Owner

Since there are many issues going related with this, we have our own index server now. No more local checks with v0.6.0. Now I am planning a support for private registries ,but first we have to decide how

@serayuzgur
Copy link
Owner

It now supports any sparse index

@mingley
Copy link

mingley commented Sep 19, 2023

It now supports any sparse index

just confirming, no support for a git based index and only sparse?

@DingYizhi
Copy link

@serayuzgur
My config.toml is like this:

[registries.public]
index = "sparse+http://DOMAIN/artifactory/api/cargo/cargo-remote/index/"

# proxy crates-io
[source.public]
registry = "sparse+http://DOMAIN/artifactory/api/cargo/cargo-remote/index/"

[source.crates-io]
replace-with = "public"

and the config in vscode is:

"crates.indexServerURL": "http://DOMAIN/artifactory/api/cargo/cargo-remote/index/",

but it seems like this doesn't work, it still goes to offical index server, error connect EADDRNOTAVAIL 13.35.49.2:443

while I directly use cargo build, it is work. so am I have the wrong config?

Thank you so much !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
5 participants