Reputation: 13061
I am looking for a Conan 2.x solution that is similiar to NPM's .npmrc
which allows us to set registry=<private registry>
and then commit that file into a git repository. NPM will honor that to resolve and upload packages, it also works with scopes.
What I have considered so far:
$CONAN_HOME
, but this also does not feel right. Caveat: requires fiddling with files and $CONAN_HOME should be considered private to Conan.conan remote add/remove
. Caveat: This requires two calls, one to remove conancenter
and one to add the private registry. There is also no simple way to check if a registry was already added besides doing some custom parsing of the output of conan remote list
or reading the CONAN_HOME/remotes.json
file. If we accidentally call the registration logic more than once Conan will give an error because the registry was already added.I am not sure if I am missing something. My preferred solution would be to just commit a .conanrc
or similar file into the git repository, so that I just need to call conan login
and start building / uploading packages.
Upvotes: 0
Views: 40