1

I tried to make a new directory in my git bash with the command mkdir but it keeps telling me "cannot create directory, permission denied"

Dell E@DESKTOP-9KIQ MING/
$ mkdir git_new
mkdir: cannot create directory ‘git_new’: Permission denied
melpomene
  • 84,125
  • 8
  • 85
  • 148
Mubarak
  • 13
  • 1
  • 5
  • 2
    Possible duplicate of [Git gives me a "Permission Denied" error when writing files that I am pulling](https://stackoverflow.com/questions/9200556/git-gives-me-a-permission-denied-error-when-writing-files-that-i-am-pulling) – Pavel Anikhouski Jul 13 '19 at 19:03
  • Well, do you have permission to create folders where you're trying to do that? – Lasse V. Karlsen Jul 13 '19 at 19:18
  • i guess so, actually, I'm new to git, so i was supposed to follow a certain convention but for some reason ,it doesnt create the new directory, i have no idea why... – Mubarak Jul 13 '19 at 19:21
  • How do i know if i have permission please – Mubarak Jul 13 '19 at 19:33
  • Please type `pwd` to know exactly where you are when doing this, as well as `ls -la` to check all permissions in your local repository (including on itself). Also, please tell us what is your exact OS. Is it a genuine Linux/Unix or is it inside a Windows 10 ? – Obsidian Jul 13 '19 at 19:36
  • it is on a windows 10 – Mubarak Jul 13 '19 at 20:30

1 Answers1

0

If you are on Windows 10 in a git bash session, type at least "cd" (to go to your homedir) before any mkdir.

It looks like you are on '/' (root folder), which is not owned by you.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250