pkg fetch

I'm trying to specify reponame using pkg fetch -r http://pkg.freebsd.org/FreeBSD:11:amd64/latest/All mc
but get

No repositories are enabled.

Have I got the wrong repository? I see it here ... Is this the wrong one or is there some extra configuration required?
 
So I should run:-

pkg fetch -r /usr/local/etc/pkg/repos/mypkg.conf mc ....?

And if this file is a copy of /etc/pkg/FreeBSD.conf it should work?

I tried this but get 'No repositories are enabled.'
 
When in doubt check the manualpage. In this case pkg-fetch(8):

Code:
     -r reponame, --repository reponame
                   Fetches packages from the given reponame if multiple repo
                   support is enabled.  See pkg.conf(5).
Well, /usr/local/etc/pkg/repos/mypkg.conf is obviously not a repo name but a filename. Looking at pkg.conf(5) this should become more clear: you need to use the name of the actual repository.
 
Consider this:
Code:
myreponame: {
  enabled: yes
  url: packages.example.com/packages/${ABI}
}

You reference that repository by its name: pkg install -r myreponame somepackage
 
When in doubt check the manualpage. In this case pkg-fetch(8):

Well, /usr/local/etc/pkg/repos/mypkg.conf is obviously not a repo name but a filename. Looking at pkg.conf(5) this should become more clear: you need to use the name of the actual repository.

Some of these man pages need a month to study - there are so many options... Thanks for pointing out my error in misunderstanding reponame....

Just FYI check pkg.conf(5) ... it includes
Code:
The file is in UCL    format.     For more information on the syntax of UCL,
     please visit the official UCL website -
     http://github.com/vstakhov/libucl.
So give it a try...
 
Back
Top