If using a custom registry that has a port specified the cargo-upgrade upgrade command will fail due to attempting to create a directory with a ':' in the name. It looks like cargo strips out the port when creating directories in the registry. The cargo-edit command should do the same.
$ cargo-upgrade upgrade
Error: failed to make directory 'C:\Users\mrichar2.cargo\registry/index\myregistry.com:8081-0224531983076253': The directory name is invalid.
; class=Os (2)
Caused by:
failed to make directory 'C:\Users\mrichar2.cargo\registry/index\myregistry.com:8081-0224531983076253': The directory name is invalid.
; class=Os (2)
From https://github.com/killercup/cargo-edit/issues/758