-r
expects repository name, not URL. Repositories are configured in /etc/pkg/; see pkg.conf(5).Custom repositories should go in /usr/local/etc/pkg/repos/.Repositories are configured in /etc/pkg/
-r reponame, --repository reponame
Fetches packages from the given reponame if multiple repo
support is enabled. See pkg.conf(5).
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.
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.
It's stored in /var/cache/pkg. Files you have locally can be installed with pkg-add(8).