# pkg can't detect local repository



## niekgigashvili (Aug 1, 2022)

Hi

I have been trying to setup local pkg repository with ports-mgmt/poudriere and followed various tutorials how to do it.
In the end I have built the packages and added a repo configuration file but pkg doesn't detect it.

I have added a configuration file /usr/loca/etc/pkg/repos/local_repo.conf

```
local_repo: {
  usr: "file:///usr/local/poudriere/data/packages/freebsd_13_1_amd64-main",
  mirror_type: none,
  signature_type: "pubkey",
  pubkey: "/usr/local/etc/ssl/certs/repo_crt.cert",
  enabled: yes,
  priority: 100
}
```

When I run
`pkg update`

I get the following:

```
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
```

I have also disabled FreeBSD repo and tried to install some package that exists in my local repository but pkg says:

```
No active remote repositories configured.
```

Simply it doesn't see my local repository. What I am doing wrong ?


----------



## SirDice (Aug 1, 2022)

niekgigashvili said:


> ```
> local_repo: {
> usr: "file:///usr/local/poudriere/data/packages/freebsd_13_1_amd64-main",
> ```


Typo here.


----------



## sko (Aug 1, 2022)

niekgigashvili said:


> ```
> local_repo: {
> usr: "file:///usr/local/poudriere/data/packages/freebsd_13_1_amd64-main",
> mirror_type: none,
> ...



I don't know what "usr" should be, but the path to the repo is given with the "url" option.
Also for a local repo mirror_type is not needed and signature/pubkey isn't really necessary (IMHO) as everything is kept local and not transferred over an unsafe connection (i.e. the internet).


----------



## niekgigashvili (Aug 1, 2022)

Thanks, it worked I didn't pay attention to typo


----------



## SirDice (Aug 1, 2022)

Always verify your settings by looking at the output of `pkg -vv`. If your (custom) repository doesn't show up it's likely there's been an error in the configuration file.


----------

