Skip to content

Attempting to run cargo new hello_cargo gives an error, not finding safe.directory #11365

Closed
@bismurphy

Description

@bismurphy

Problem

Hello,

I'm attempting to start using Rust for the first time. I was going through this guide:

https://doc.rust-lang.org/book/ch01-03-hello-cargo.html

I ran the basic Hello World, and now when it was time to start using Cargo, I went into my projects directory (which currently holds only the hello_world directory), and, as per the guide, ran cargo new hello_cargo. When I run this, I get the following error:

error: Failed to create package 'hello_cargo' at '/home/bismurphy/Projects/Rust/hello_cargo'

Caused by:
  config value 'safe.directory' was not found; class=Config (7); code=NotFound (-3)

After this occurs, the hello_cargo directory has been created, but is empty.

Steps

Unable to provide any reliable reproducing steps.

Possible Solution(s)

No response

Notes

I'm running a fairly fresh installation of Mint 21. I just installed it last week. I'm not using Docker or anything like that, and I just installed Rust with the procedure listed in the guide I linked above.

Version

cargo 1.65.0 (4bc8f24d3 2022-10-20)
release: 1.65.0
commit-hash: 4bc8f24d3e899462e43621aab981f6383a370365
commit-date: 2022-10-20
host: x86_64-unknown-linux-gnu
libgit2: 1.5.0 (sys:0.15.0 vendored)
libcurl: 7.83.1-DEV (sys:0.4.55+curl-7.83.1 vendored ssl:OpenSSL/1.1.1q)
os: Linux Mint 21 (vanessa) [64-bit]

Metadata

Metadata

Assignees

Labels

A-gitArea: anything dealing with gitC-bugCategory: bugregression-from-stable-to-stableRegression in stable that worked in a previous stable release.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions