I created a git repo on my vps through root and made it shared so a group of people have the ability to access it:
# mkdir example.git # cd example.git # git init --bare --shared=group Initialized empty shared Git repository in /root/example.git/ # ls branches config description HEAD hooks info objects refs # chgrp -R devs .
Then as a user on my local pc I created a dir and added example.git as the new origin for this git repo. Finally I tried to to make a push to origin:
mkdir bubbles && cd bubbles bubbles ranuka$ git init Initialized empty Git repository in /Users/ranuka/Desktop/bubbles/.git/ bubbles ranuka$ ls bubbles ranuka$ git remote add origin email@example.com:example.git bubbles ranuka$ echo "Hello" > readme.txt bubbles ranuka$ git add readme.txt bubbles ranuka$ git commit -m "Adding a readme file" [master (root-commit) 2c89e43] Adding a readme file 1 file changed, 1 insertion(+) create mode 100644 readme.txt bubbles ranuka$ git push origin master firstname.lastname@example.org's password: fatal: 'example.git' does not appear to be a git repository
Confounded by this error since I know example.git is clearly a repo on my vps. I logged in on my vps as 'ranuka' and tried to cd to example.git yet couldn't, but for some reason I could as root.. What gives?
My goal was to create a git repo on my vps that a bunch of users in a certain group could access and make push/pulls to.
EDIT: After running ls -a on email@example.com and firstname.lastname@example.org These were the results:
. example.git .. gitosis ajenti-repo-1.0-1.noarch.rpm install.log anaconda-ks.cfg install.log.syslog .bash_history pgdg-centos93-9.3-1.noarch.rpm .bash_logout .pki .bash_profile repo.git .bashrc .rnd .cshrc .ssh epel-release-6-8.noarch.rpm .tcshrc
. .. .bash_logout .bash_profile .bashrc
So it seems as if root and ranuka are located on different directories with no relationship whatsoever.