How do I configure a local Chocolatey repository?

12,228

Solution 1

What version of Chocolatey are you using?

choco source add -n name -s location

https://github.com/chocolatey/choco/wiki/CommandsSources

A side note - you may also need at least 1 package in there.

Solution 2

Currently, there is a disconnect between ChocolateyGUI and Chocolatey, in terms of the sources that are defined. This is a known issue, which is being tracked on this issue. There was some initial work to reconcile these two sources configuration files in this pull request, but that hasn't been pulled in yet. This is due to the fact that we are moving ChocolateyGUI to use the Chocolatey Library, which means they will be configured out of the box. This work is still on going though.

For now, you can add Sources into ChocolateyGUI by following the instructions in this wiki article. The instructions are copied below as well:

  1. Open ChocolateyGUI
  2. Click the "settings" button at the top right of the screen
  3. Click Sources
  4. Enter the Name for the new Source
  5. Enter the Url for the new Source
  6. Click the "add source" button

Hope this helps!

Share:
12,228
gregsdennis
Author by

gregsdennis

I have strong opinions, but I can be convinced that they're wrong.

Updated on June 26, 2022

Comments

  • gregsdennis
    gregsdennis about 2 years

    I'm trying to learn about Chocolatey by setting up a local repository on my machine (c:\ChocolateyLocal\). However, I can't seem to add the folder as a source. I've tried using the command line and ChocolateyGui, and I get the same error:

    Failed to query source.

    The paths I've tried are (all with and without trailing \):

    • c:\ChocolateyLocal
    • file://localhost/c/ChocolateyLocal (my C-drive is shared privately for dev purposes, don't judge me)
    • file:///C:/chocolateylocal
    • \\localhost\c\ChocolateyLocal
    • http://localhost/c/chocolateylocal

    I'm using the latest Chocolatey (v0.9.9.11).

  • gregsdennis
    gregsdennis over 8 years
    It seems this works on the command line, but it's not working in the ChocolateyGUI app.
  • ferventcoder
    ferventcoder over 8 years
    Sounds like a followup for the ChocolateyGUI folks
  • gregsdennis
    gregsdennis over 8 years
    That's interesting. I thought it was merely a UI shell around the command line structure. Much like tortoiseHg.
  • Gary Ewan Park
    Gary Ewan Park over 8 years
    @gregsdennis that is certainly the intention, and that will be the case once we fully take the dependency on the Chocolatey Library. For now, because we are talking to the oData Endpoints directly from within ChocolateyGUI, the sources have to be managed separately.
  • CMCDragonkai
    CMCDragonkai almost 2 years
    When you add -n name does this imply that the location is a single internalised package? Or can the source be a directory with multiple internalised packages?