In order to verify the gpg signature on repository, cargo is launching gpg and trying to parse the output for correct verification. This can break in many ways, the simplest one actually being language configuration by the environment.
lucab@galatea:$ echo $LANG
it_IT.utf8
lucab@galatea:$ cargo init
error: signature verification failed for '/home/lucab/.cargo/sources.json.new'
lucab@galatea:~$ LANG=C cargo init
info: initialized .cargo in /home/lucab/.cargo
In order to verify the gpg signature on repository, cargo is launching gpg and trying to parse the output for correct verification. This can break in many ways, the simplest one actually being language configuration by the environment.
lucab@galatea:
$ echo $LANG$ cargo initit_IT.utf8
lucab@galatea:
error: signature verification failed for '/home/lucab/.cargo/sources.json.new'
lucab@galatea:~$ LANG=C cargo init
info: initialized .cargo in /home/lucab/.cargo