Clone Git Permission Denied

Got it 👍 kau nak bagi user sekarang (whoami) masuk dalam git group supaya boleh access folder / repo tanpa perlu sudo setiap kali.


1. Check current user

whoami

Contoh output:

econtent

2. Check if git group exists

getent group git

Kalau keluar kosong → maksudnya belum ada group git. Boleh create:

sudo groupadd git

3. Add user ke group git

sudo usermod -aG git $(whoami)

atau kalau user kau memang econtent:

sudo usermod -aG git econtent

4. Refresh group membership

Logout & login semula, atau run:

newgrp git

5. Confirm user dah masuk group git

groups $(whoami)

Output patut ada git dalam senarai.


👉 Lepas tu, kau boleh ubah permission folder /var/www/eclaim.mpm.edu.my supaya group git boleh tulis:

sudo chown -R econtent:git /var/www/eclaim.mpm.edu.my
sudo chmod -R 775 /var/www/eclaim.mpm.edu.my

Did you find this article useful?