
Private Git Repository on Any Computer - akras14
https://www.alexkras.com/private-git-repository-on-any-computer/
======
tomc1985
It pains me to think that people nowadays need to be reminded that many cloud
services were/are originally available locally, for unlimited use. Amazon's
whole services model seems to revolve around converting on-prem services into
cloud offerings, even.

Modern computing is just like the chemicals industry now. You can clean your
whole house with just a few simple ingredients (only one is a product --
water, citrus, baking soda, vinegar, mud, and bleach), but how many of us
actually know that? Instead we go to the store and pick up Windex, Drain-o,
and everything else, because we paid more attention to advertisements and
marketing droids than the world around us.

The damage that modern technology has done to human resourcefulness makes me
weep

~~~
vanattab
Ok you peaked my interest. How do I clean with mud? Are you simply using a
"Sandy mud" as an abrasive?

~~~
Lxr
Sorry to be that guy, but I thought you might want to know: it's "piqued" my
interest.

------
majewsky
The point of Github is not so much the repo hosting part (well, that too). The
point of Github is

\- the nice web UI for browsing code

\- the social features (issues, pull requests, reviews)

That's why, after years of Gitolite (i.e. nearly as bare Git hosting as the
submission discusses), I've switched to Gogs last year.

~~~
tyingq
Probably worth highlighting the gogs/gitea split:
[https://github.com/gogits/gogs/issues/1304#issuecomment-1191...](https://github.com/gogits/gogs/issues/1304#issuecomment-119106551)

I would guess given that, gitea would be the better road at the moment.

~~~
compuguy
I'm not sure, it looks _both_ are still active.

~~~
tyingq
That's fair enough. There's isn't really a good current state comparison of
the two.

It was discussed in January, on HN, here:
[https://news.ycombinator.com/item?id=13296717](https://news.ycombinator.com/item?id=13296717)

------
asidiali
I built a free lightweight service that automates this, and provides a nice
CLI tool for interacting with it. Right now it deploys to free hosting on the
gitup servers. Repo auth is handled via git-ssh verification with offloaded
key storage and individual user roles/permissions.

[https://gitup.io](https://gitup.io)

[https://npmjs.com/package/gitup-cli](https://npmjs.com/package/gitup-cli)

Some commands include:

\- `gitup login <username>` : authenticates/registers user

\- `gitup new <repo-name>` : creates a new repo at gitup.io/username/repo-name

\- `gitup add-user <repo-name> <username>` : share a repo with another gitup
user

Repos are private by default. Right now this is a very basic free service but
hope to expand the offering quickly including self hosting the repo storage,
the key store, web interface, etc.

Would love to know if you check it out and come across a bug or have any
feedback for me! Thank you.

~~~
divbit
Minor Feedback: I think part of the point of private hosting is privacy /
security. Maybe some info on the landing page or documentation about what kind
of security is provided would help people decide whether to use it. Also your
npm package could use an actual module rather than just cli tool

~~~
asidiali
Appreciate it! So far I've been only able to put minimal time into this,
definitely trying to ramp up. I agree I need way, way more information about
what the service is, why it's any good, etc.

Roger on the module, plans there as well - hope you'll check it out again
soon.

Thanks again for your advice, much appreciated.

------
JustSomeNobody
Wait, so people use git and they don't know this?

How?

~~~
pavel_lishin
People drive without understanding engines. People cook without understanding
the maillard reaction.

~~~
ryandrake
This isn't like driving without understanding engines. This is about paying a
chauffeur to drive you everywhere without realizing that you could always just
drive yourself there.

EDIT: Or better, having your buddy drive you in your car everywhere without
realizing you could drive yourself.

------
Zikes
I recently did something like this as well, and one thing I particularly
missed was the convenience of quickly creating the remote repository, so I
made this bash script:
[https://gist.github.com/zikes/926fd8bb72f9856776e309fba45f07...](https://gist.github.com/zikes/926fd8bb72f9856776e309fba45f07cc)

An interesting thing about git, if there's an executable somewhere in your
$PATH and it starts with git-, then it becomes a "git command". So in my case,
I named it git-make-remote.sh, and I can execute it via "git make-remote
myreponame" and it will SSH to my private git server and create the associated
remote repo.

------
divbit
I have essentially the same tutorial on my readme here:
[https://github.com/divbit/grimoire](https://github.com/divbit/grimoire)
except I've included a step where Ubuntu uncomplicated firewall is setup. I
wonder if anyone has any suggestions on other basic security measures that
should be taken for a private git repo?

~~~
divbit
I should add Linode to that.. didn't realize they have a $5 instance, having
never used them.

------
ryd994
I've git all my local scripts and snippets for years. Good to rollback
sometimes. I have a 2010 laptop running behind TV. Any SSH host can be git
server. And it hosts my owncloud. In purpose of rolling back binary documents,
it works much faster and frequently.

------
rkcf
I built a docker container that can serve as a quick plug and play ssh over
git repository: [https://github.com/rkcf/docker-git-
server](https://github.com/rkcf/docker-git-server)

------
viraptor
Even if you need issues, you can still use apps like gitissius that will store
the data in your repo
[https://github.com/glogiotatidis/gitissius/blob/master/READM...](https://github.com/glogiotatidis/gitissius/blob/master/README.org)

For PRs there's [https://github.com/google/git-
appraise/blob/master/README.md](https://github.com/google/git-
appraise/blob/master/README.md)

------
jsilence
Those who are missing issue tracking with this approach might want to consider
using Fossil ([https://www.fossil-scm.org/](https://www.fossil-scm.org/))
which includes a wiki and issue tracking in one simple DSCM system.

~~~
isxek
Until you start hankering for "rebase" or any other history-altering commands.
However, if you don't generally use them, Fossil should be able to suit your
VCS needs well enough.

------
ttd
For a lot of my non-critical work that I want to share between computers (e.g.
desktop and laptop), I commit to various git repositories in my Dropbox. It's
very convenient, and allows me to share my git repos as seamlessly as
documents.

~~~
hellcow
Careful with that. I used to do something similar, then one day all my git
repos were suddenly corrupted due to duplicate and renamed files in the .git
directory. I pinged Dropbox support to notify them of a bug in their OSX
client, and their response was "Don't store git repos in Dropbox." YMMV

~~~
Jare
I had that happen with AeroFS instead of Dropbox, simply by using a repo on
one machine that was not synced to the contents of the other machine. This can
happen either if a machine doesn't finish sync to dropbox after using a repo
in it, or the repo is used before the machine has finished syncing from
dropbox. A simple "git commit" and close the laptop in a hurry as soon as the
command finishes would likely do it.

