NewAtLearningThis
NewAtLearningThis

Reputation: 239

Learning Git - Permission denied while creating a directory

I am absolutely new to Git and the concept of it. I am going through a git immersion here: http://gitimmersion.com/lab_03.html I am creating a directory called hello by using the command

mkdir hello

However, I get this error enter image description here

I'm not sure what to do here.. why am I getting permission denied? Again, sorry if this is a very basic question but I am completely new to this. I have tried googling it but the results seem to be a lot more complicated than what I am just trying to accomplish here.

Upvotes: 1

Views: 1794

Answers (3)

Syed
Syed

Reputation: 1

/ symbol means your are in root directory So,just go to your C:\Users<user name> and that will solve your problem

Upvotes: -1

marblewraith
marblewraith

Reputation: 778

The error message tells you what you need to know. This is a user / permission issue, not a git issue.

According to your terminal you are in the root directory (that's what / means).

Therefore your user account doesn't have permissions to create stuff inside the root directory, which is typically not what most people want to do anyway (at least not in *nix based systems).

The best way to get around this is to navigate to your user accounts "home" directory (represented by ~) where (typically) you have complete unrestricted privs, using the cd ~ command.

Note the absolute path of this home directory in windows is usually C:\Users\<user name>

Upvotes: 1

Jonathan.Brink
Jonathan.Brink

Reputation: 25433

It looks like you are trying to make a directory in the "root" directory, as I see your current working directory is /. This probably isn't where you want to create any files or folders, it's just something added by your terminal-emulator to give you a "bash"-like (linux) environment.

To get to one of your Windows drives, for example C, use cd /c. You can see where you currently are with pwd.

Also see:

Upvotes: 1

Related Questions