Problem with cargo install on virtual box


#1

Hi all,

I’m trying to install racer on a vritualbox instance of Arch linux and I ran into this issue:

$ cargo install --git 'https://github.com/phildawes/racer.git' --verbose
    Updating git repository `https://github.com/phildawes/racer.git`
failed to fetch into /home/joe/.cargo/git/db/racer-543cd64b49f18a74

Caused by:
  failed to authenticate when downloading repository

Caused by:
  [23/-1] error authenticating:
```

I can `git clone` the race repository normally, so I'm not sure what's going on.  Any ideas?

#2

I just tried this with a Debian based VirtualBox instance i have, and it worked fine. (I don’t have Arch ready to go.) I suspect there might be an HTTP proxy on your network and that the NAT of the virtual box is getting in the way. Try changing the network interface for the VM machine to bridged instead of NAT and see if that works.


#3

I tried switching over to bridged adapter. No change. I still receive the same error.


#4

Try to download the package on your host machine, convert it into an ISO file, then transfer it into VB.

Then, you can try installing manually using the cargo install command.

I haven’t tried it yet, although I do have a installation of Antergos (Arch derivative) ready.


#5

When I ran the cargo install with sudo, it worked fine. Is that expected behavior?


#6

I should have took a second look at the failed to authenticate phrase. :slightly_smiling:

I think that is the desired behaviour, judging by the error message.