Announcement

Collapse
No announcement yet.

Getting CLI to use a private Nuget server?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Getting CLI to use a private Nuget server?

    Is it possible to set the package source for the CLI to use?

    #2
    Hello!

    I see the option is there, yet not complete nor documented. There is the option to add, but not to remove one, once added. Well, but here are the directions:

    - To add a repo, do:

    bridge add repo <repository_path>
    The <repository_path> placeholder can contain a local windows/unix path ("c:\projects\nuget\repository", "c:/projects/nuget/repository", "/home/projects/nuget/repository") and also a remote location ("https://www.nuget.org/api/v2/package/").

    EDIT: Ops, forgot to add the steps to remove one.
    - To remove a repo, do:
    Open the repos.config file in the same directory the bridge.exe file is (not the bridge extensionless wrapper on linux/osx). Simply remove the XML blocks pointing to the repo you want to wipe, and that would be it.

    I hope this helps!

    Comment


      #3
      Where is this "repos.config" in linux?

      I see that the bridge command is what I think you're referring to as the extensionless wrapper, (which bridge => /usr/local/bin/bridge)
      But its not clear where/what repos.config is

      Comment


        #4
        I found one here: ./opt/bridge-cli.17.3.0/repos.config

        But even so, I still get an error: The remote server returned an error (404) Not Found.
        Though this all works fine in windows and on VS2017.

        Inspecting this repos.config, I noticed that the repo path seems like its in a strange format: Path="<projectPath>/http://path-to-nuget-server"
        This may be intended but seemed strange to me. Also wanted to provide as much information as possible.

        As you may have already implied, I'm running in linux (more specifically a docker contain on a linux VM host).
        The nuget server has authentication enabled, but this should be covered by the NuGet.config files located in these two locations:
        ~/.nuget/NuGet/NuGet.Config
        ~/.config/NuGet/NuGet.Config

        Comment

        Working...
        X