Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools GitHub Basics Working By Yourself Push Your Project to GitHub

Matthew Root
Matthew Root
5,392 Points

git console *permission denied*

I have integrated git on my notepadd++ console but when I type in git init in my console I get this error:

C:/Program Files (x86)/Notepad++/.git: Permission denied

what do I do to make a new repository or access repositories from my github account on my notepad++? Thanks so much!

3 Answers

Alexander Nikiforov
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Alexander Nikiforov
Java Web Development Techdegree Graduate 22,175 Points

As far as I see it, you are trying to create directory with Git in C:/Program Files(x86)/Notepad++ directory. Probably its write-protected for you. That's why it is complaining. Try to change directory to place where you can create directories, e.g. C:/My Documents, or to Desktop...

Matthew Root
Matthew Root
5,392 Points

ok, I changed directories and I tried making a new directory called matt and this is what I got in return:

Process started >>>
fatal: cannot mkdir matt: Permission denied
<<< Process finished. (Exit code 128)

Thanks for your help.

Alexander Nikiforov
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Alexander Nikiforov
Java Web Development Techdegree Graduate 22,175 Points

It seems like you are still on write-protected directory. Try to describe what exactly are you doing. I will write, how it looks to me: You are using notepad++ command line plugin in Windows to run git commands, like "git init matt" If it is right, there should be a path shown where you type it: something like this:

C:\Program Files(x86)\Notepad++>

Then you change your directory to somewhere where you can create files. I unfortunately do not have Windows close by, but I think you type this:

cd C:\Users\matt\Documents

And then git:

git init matt

And then it gives an error.

If it is so, the directory that you are in is still write-protected. Try to use manually mkdir matt Find the directory where this command will work, "cd" into it and then type "git init".

But that will work if I guessed right steps you've done right...

Matthew Root
Matthew Root
5,392 Points

Thanks man so much for your help. I really appreciate it. I found the command to get out of that file- cd /cd/program files. Do you mind if I ask you one more annoying question? Since I am out of that file and now have successfully created a new repository how than do I open that file in notepad++ to actually make code?

Alexander Nikiforov
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Alexander Nikiforov
Java Web Development Techdegree Graduate 22,175 Points

Didn't quite understand the question... As long as you know where you created repository, where you typed 'git init'. You just open new file (File->New... I don't remember exactly) and then save it to the place where your repository was created. After that you can start adding this file and committing changes to your repository in console, if I understand correctly your setup.