10
Oct
2017
Vagrant: editing metadata_url file causes illegal character issue
By Eric Downing. Filed in Uncategorized |I was editing the ~/.vagrant.d/boxes/
$ vagrant box update
==> default: Checking for updates to 'edev-developer'
default: Latest installed version: 2.0.5
default: Version constraints:
default: Provider: virtualbox
There was an error while downloading the metadata for this box.
The error message is shown below:
Illegal characters found in URL
The illegal character happens to be an EOL char added automatically by your editor, mine was vi, and that is causing the error. I used the following commands to remove the eol character from the file.
perl -pe 'chomp if eof' .vagrant.d/boxes//metadata_url > .vagrant.d/boxes/ /metadata_url2 mv ~/.vagrant.d/boxes/ /metadata_url2 ~/.vagrant.d/boxes/ /metadata_url



Friday, February 23rd 2018 at 9:16 pm
Thanks, that was a life saver!
Wednesday, March 7th 2018 at 6:22 pm
Glad it helped!
Thursday, July 5th 2018 at 3:34 am
This is exactly the solution I was looking for. Thanks a lot!