Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
How I can configure apache to access /home/git/repo.git ?
I have configured it like that /etc/apache2/sites-enabled/git.x.xxx
<VirtualHost *:80> ServerAdmin webmaster@server DocumentRoot /home/git/ <Directory /home/git/> Options ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch AllowOverride All order allow,deny Allow from all </Directory> Servername x.xxx ServerAlias www.x.xxx </VirtualHost>
But I.ve got 403 error (also via $git clone git.x.xxx/repo.git ). What I.m doing wrong?
@Leo: repo.git doesn’t contain your code – it only contains info useful to git.
Clone it somewhere else:
<pre># as user git: cd ~ git clone repo.git </pre>
That should clone it to /home/git/repo - set DocumentRoot to /home/git/repo
Very nice tutorial! I love using GIT and currently have a few repositories hosted over at bitbucket. Its always nice learning how to do things like this yourself though.
Along with the response of Kamal Nasser above. If you want to turn this into a continuous deployment solution, all you need to do (as user git)
cd ~/my-project.git/hooks
In that folder:
touch post-receive && nano post-receive
In that file, add the following script
#!/bin/sh
cd /var/www/whatever
git pull my-project.git
Done. Instant deployment when you commit to the repository.
I’m curious, how many other people are using (or have heard) of gitolite? I have a git+gitolite+deploy environment setup. Curious if people would be interested in an article about that.
cat .ssh/id_rsa.pub | ssh user@123.45.56.78 “cat >> ~/.ssh/authorized_keys” could you explain this sentence,please?
if it run in root mode: ‘~’ becomes /home/root/ so I will cat>> run file if it run in git user mode I cant access ssh/id_rsa.pub because it in root mode
I am freshman for linux, I am not sure is that true for my desciption
@shyandsy: <strong>cat .ssh/id_rsa.pub | ssh user@123.45.56.78 “cat >> ~/.ssh/authorized_keys”</strong> is split into two parts:
<ol><li><strong>cat .ssh/id_rsa.pub</strong> reads the id_rsa.pub file and outputs its contents</li><li><strong>ssh user@123.45.56.78 “cat >> ~/.ssh/authorized_keys”</strong> appends the input text to the authorized_keys file in your user’s home directory</li></ol>
No home/git directory was created when I used “useradd git”
Is it safe to use “adduser git” ?