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!

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 Git Basics Getting Started With Git Working With Git Repositories

Domagoj Kirigin
Domagoj Kirigin
16,392 Points

Cannot use Git -bash console: Permission denied

I installed Git on my computer (Windows) with intention of using it instead of treehouse console. When I try to follow along with video, inside the console I cannot do git init. It says "fatal: cannot mkdir my_first_repository: Permission denied". Why I don't have permission and how to solve this?

1 Answer

Seth Kroger
Seth Kroger
56,412 Points

What's your current directory path? If you are trying to run the command from the drive's top directory (e.g. C:) it probably requires Administrator privileges to make a new one there. Try doing it from C:\Users\YourUsername\Documents (the My Documents folder in shell-speak) instead.