Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thecodesmith/git-server
https://github.com/thecodesmith/git-server
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/thecodesmith/git-server
- Owner: thecodesmith
- Created: 2015-11-05T17:04:55.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-06T05:24:27.000Z (about 9 years ago)
- Last Synced: 2024-11-01T20:52:10.828Z (about 2 months ago)
- Language: Groovy
- Size: 0 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Private Git Server
## Initialize Server
Create a user named `git` on the server. Run the [setup script](setup/server.sh)
for setting up a server on Ubuntu.## Set up local SSH configuration
Add this setting to your local SSH configuration at `~/.ssh/config`:
Host tcs
User git
HostName thecodesmith.comOf course, replace the `HostName` as necessary. The `Host` name can be set to
anything you like. I like abbreviations.## Add local SSH public key to the server's authorized keys
Run this command, and enter the password created when setting up the `git` user
on the server:ssh-copy-id tcs
Note: On Mac OS X, there is no ssh-copy-id command, so an alternative is this:
cat ~/.ssh/id_rsa.pub | ssh tcs "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"
## Test Connection
Test the new Git server with the command:
git-create tcs:hello-world
This should create a repo called `hello-world` on the `tcs` server. It can now be used
like any other Git remote, for example pushing from a local repository:git remote add private tcs:hello-world
git push -u private masterOr cloning the repository:
git clone tcs:hello-world