# iocage and fetching from local repository



## Bucky (Jul 8, 2015)

Okay, I give up. I'm an idiot.

Trying to work with sysutils/iocage.  Trying to use this functionality:


```
iocage fetch [release=RELEASE | ftphost=ftp.hostname.org | ftpdir=/dir/]
```

To use a local repository instead of the FreeBSD.org machines.

Does this *require* that the repository machine be running an http daemon and not merely an ftp daemon on my local repository machine?

In this script:  /usr/local/lib/iocage/ioc-common

Is this line:


```
fetch http://${ftphost}${ftpdir}/${file}
```

Which would seem to force the fetch routine to connect with an httpd.  I'm not running an httpd on my local respository.  The iocage fetch... fails EVERY time with bizarre output.

Am I missing something?  Spent days screwing with this.


----------



## Bucky (Jul 9, 2015)

I finally solved this.  Solution in the How-To section.  (thanks moderator for fixing the "code" stuff.)


----------

