artifactory vagrant repo, getting json or 404 response when trying to download the image -


good time of day all, have setup pro version of artifactory , have setup vagrant repo 1 file. however, when try file artifactory following response instead of downloading file , due setting incorrect repo layout. default artifactory sets simple-default layout think causing issue

{"name":"vagrant-centos-base.box","description":null,"short_description":null,"versions":[]} 

obviously, when try use vagrant command url repo/file specified following error:

bsdtar.exe: error opening archive: unrecognized archive format 

which suspect due vagrant downloading response instead of actual file.

what missing?

thank in advance!

here output vagrant:

bringing machine 'webserver' 'virtualbox' provider... bringing machine 'webserver1' 'virtualbox' provider... bringing machine 'appserver' 'virtualbox' provider... ==> webserver: box 'vagrant-centos-base' not found. attempting find , install...     webserver: box provider: virtualbox     webserver: box version: >= 0 ==> webserver: loading metadata box 'https://{url}/artifa ctory/api/vagrant/b6_vagrant/vagrant-centos-base'     webserver: url: https://{url}/artifactory/api/vagrant/b6_ vagrant/vagrant-centos-base ==> webserver: adding box 'vagrant-centos-base' (v1.0.0) provider: virtualbo x     webserver: downloading: https://{url}/b6_vagrant/vagrant- centos-base.box     webserver: progress: 0% (rate: 0curl:/s, estimated time remaining: --:--:--)     webserver: error occurred while downloading remote file. error message, if any, reproduced below. please fix error , try again.  requested url returned error: 404 not found 

as can see, getting medatada, failing download file since artifactory giving 404. same when try manually

it seems uploaded vagrant box artifactory without provide box metadata - name, provider, version.
when vagrant trying download box via vagrant api, expects json response describes image , provided download link, example:

{"name":"debian-current","description":null,"short_description":null,"versions":[{"version":"12","status":"active","description_html":null,"description_markdown":null,"providers":[{"name":"provider","url":"http://localhost:8081/artifactory/local-vagrant/debian-current.box"}]}]} 

if metadata missing, vagrant not know how proceed.

you can still install box uploaded without metadata. have use direct download url box (not passing via vagrant api), example:

vagrant box add http://myserver/b6_vagrant/vagrant-centos-base.box --name vagrant-centos-base.box 

this return actual bits of box. notice have provide vagrant add command name of images using --name parameter.

uploading box metadata can done using deployment ui or rest api.
can use "set me up" feature getting detailed instructions process
enter image description here

for more info please take @ vagrant repositories section in artifactory documentation


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -