M BUZZ CRAZE NEWS
// news

git init - permission denied

By Sarah Rodriguez

When I try git init I get permission denied. I'm new to Ubuntu. What might be the reason?

Terminal:

(python36) jkbielan@jkbielan:~/python/projects/leetcode-python$ git init
/home/jkbielan/python/projects/leetcode-python/.git: Permission denied

I tried git init direction and sudo git init direction:

(python36) jkbielan@jkbielan:~/python/projects/leetcode-python$ git init /home/jkbielan/python/projects/leetcode-python
/home/jkbielan/python/projects/leetcode-python/.git: Permission denied
(python36) jkbielan@jkbielan:~/python/projects/leetcode-python$ sudo git init /home/jkbielan/python/projects/leetcode-python
sudo: git: command not found

Thanks for help.

1 Answer

Git wasn't installed in main environment. python36 didn't have permissions and sudo git init didn't work because git wasn't installed.

Lines of code that helped:

source deactivate python36
sudo apt-get install git
git init /home/jkbielan/python/projects/leetcode-python
2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy