Git locally save remote connection password by connecting via root @

I just would like to start with the fact that I'm completely new to git, so I'm probably doing it wrong, but I try to follow the messages here and keep online. I know this is probably a dumb post, but I'm just a web designer, very simple at that, would like any advice on how I do this, or if there is a better way.

I installed git on my centos vps and then set up my repository inside my site, here:

/var/www/vhosts/server.userfarmer.com/userfarmer/userfarmer.git

The userfarmer folder in front of the .git folder is my main directory of sites, I'm trying to download my site from local computers via git to this folder. I installed this on top of ssh using:

mkdir userfarmer.git
cd userfarmer.git
git --bare init

Then I set up a local git connection locally using:

git remote add origin root@serverip:/var/www/vhosts/server.userfarmer.com/userfarmer/userfarmer.git

, , , root, , , , .

, , , ,

+4
2

.ssh root.

mkdir /root/.ssh/

700.

chmod 7000 /root/.ssh/

"authorized_keys" .ssh 600

touch /root/.ssh/authorized_keys
chmod 600 /root.ssh/authorized_keys

:

i.e loptop.pub content authorized_keys.

cat ~/.ssh/laptop.pub | ssh root@serverip "cat >> ~/.ssh/authorized_keys"
+5

.git/

URL = @ServerIP:/var/www/vhosts/server.userfarmer.com/userfarmer/userfarmer.git

:

URL = : @serverip:/var/www/vhosts/server.userfarmer.com/userfarmer/userfarmer.git

, , ,

git : @serverip:/var/www/vhosts/server.userfarmer.com/userfarmer/userfarmer.git

+1

All Articles