-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
A-configurationArea: cargo config files and env varsArea: cargo config files and env varsC-bugCategory: bugCategory: bug
Description
Problem
When running cargo inside a sandbox that rejects access to ~/.cargo/credentials, cargo build
fails. I prefer to run VScode in a sandbox and not give it access to confidential files such as ~/.cargo/credentials. cargo build
really shouldn't need access to my credentials, so this seems like it should be avoidable.
Steps
- Change permissions such that ~/.cargo/credentials is unreadable
- Do some cargo action that does not require credentials
- You get:
error: Permission denied (os error 13)
The error message is quite bad as it doesn't even say which file is affected! I had to use strace
to determine that (which was hard because strace is blocked in the sandbox...)
EDIT: Error message fixed via #7649.
Possible Solution(s)
Only read credentials when needed, i.e., in cargo publish
.
Notes
Output of cargo version
:
cargo 1.41.0-nightly (8280633db 2019-11-11)
est31
Metadata
Metadata
Assignees
Labels
A-configurationArea: cargo config files and env varsArea: cargo config files and env varsC-bugCategory: bugCategory: bug