How to setup a git repository

Share your awesome tips and tricks here.
Post Reply
segar
Posts: 1
youtube meble na wymiar Warszawa
Joined: Thu Dec 03, 2015 3:14 am

How to setup a git repository

Post by segar »

Is that anybody setup a git repository that can be accessed from a local network client. Either using WebDAv og ssh.
msa
Posts: 2
Joined: Wed Jan 06, 2016 4:44 am

Re: How to setup a git repository

Post by msa »

I did it based on http://thelucid.com/2008/12/02/git-sett ... tial-push/ , it was actually pretty easy.

I created a new share called "git_repos" on volume1.
Install the git app on the NAS.
Log in to the shell as admin using ssh and execute these commands:

Code: Select all

cd /volume1/git_repos/
mkdir <repo-name>
cd <repo-name>
git init --bare
On your workstation/client, set up the remote server:

Code: Select all

git remote add <your_server_name> ssh://admin@<your_server_name>:<ssh_port>/volume1/git_repos/<repo-name>
Then push up from client to the server:

Code: Select all

git push raidnas1 master
Post Reply

Return to “Tips & Tricks”