Live data from Hacker News

Show HN: Encrypted Git hosting should be easy

github.com

11–20 of 71 posts

Re: Show HN: Encrypted Git hosting should be easy

#11
This is too dang complicated.

For years, across two different jobs we just had bare repos on Linux servers - we used git's built in ssh support and we liked it. Worked great. We wanted a Pull Request workflow and moved to GitHub, but self hosted is fine.

All you really need is a server your developers can SSH into with a shared directory. $2 a month Vultr server and you're golden.

You want to get real spicy, you can just do this without a central server at all, The way God and Linus intended. git was designed to be decentralized. You don't even need to share the server, you can just pull from each other's repos if you give each other your SSH access to each other's repos.

Re: Show HN: Encrypted Git hosting should be easy

#12
post #11

This is too dang complicated. For years, across two different jobs we just had bare repos on Linux servers - we used git's built in ssh support and we liked it. Worked great. We wanted a Pull Request workflow and moved to GitHub, but self hosted is fine. All you really need is a server your developers can SSH into with a shared directory. $2 a month Vultr server and you're golden. You want to get real spicy, you can…

git with ssh on a server is fantastic, though sometimes managing and paying for the server can be annoying.

afaik it's not possible to have an untrusted git server, at a minimum ram contents will be plaintext.

before i undertook this, i had never heard of git-bundle:

https://git-scm.com/docs/git-bundle

Re: Show HN: Encrypted Git hosting should be easy

#14

Great work. Is it possible to reconfigure this to use existing tools like rclone which can save encrypted files across multiple remotes. Thus way J can use my Google Drive or Dropbox to store instead of needing to use s3.

git-remote-gcrypt supports rclone, and all of it's backends. i would use that for your use case.

this takes an explicit dependency on aws, though all that is needed is:

- (large) object storage with read-after-write consistency (s3)

- (small) object storage with compare-and-swap (dynamodb)

it would be easy to port this to any provider that provides these two kinds of object storage.

compare-and-swap means that multiple concurrent writers can safely collaborate without risk of force pushing over each other.

Re: Show HN: Encrypted Git hosting should be easy

#15
This is pretty cool as a new way to unbundle/change how people host git. While it's pretty AWS heavy now, some interfaces around the interaction and I can easily imagine this working with other providers (ex. Backblaze) and start shimming out the coordination pieces (currently Dynamo).

Reminds me a lot of gitaly[0].

Awesome work!

[0]: https://gitlab.com/gitlab-org/gitaly

Re: Show HN: Encrypted Git hosting should be easy

#16

This is pretty cool as a new way to unbundle/change how people host git. While it's pretty AWS heavy now, some interfaces around the interaction and I can easily imagine this working with other providers (ex. Backblaze) and start shimming out the coordination pieces (currently Dynamo). Reminds me a lot of gitaly[0]. Awesome work! [0]: https://gitlab.com/gitlab-org/gitaly

thanks! git-remote-gcrypt has rclone support, which provides all possible backends.

the addition here is a second object store with compare-and-swap semantics making it possible for multiple writers to collaborate safely.

many infra providers have object storage with those semantics, my preference is aws.

Re: Show HN: Encrypted Git hosting should be easy

#17
post #11

This is too dang complicated. For years, across two different jobs we just had bare repos on Linux servers - we used git's built in ssh support and we liked it. Worked great. We wanted a Pull Request workflow and moved to GitHub, but self hosted is fine. All you really need is a server your developers can SSH into with a shared directory. $2 a month Vultr server and you're golden. You want to get real spicy, you can…

git with ssh on a server is fantastic, though sometimes managing and paying for the server can be annoying. afaik it's not possible to have an untrusted git server, at a minimum ram contents will be plaintext. before i undertook this, i had never heard of git-bundle: https://git-scm.com/docs/git-bundle

> at a minimum ram contents will be plaintext

The only thing that's going to remain resident after a push/pull is os level file system cache. There's no daemon when operating git over ssh.

Are container escapes on major hosting services common enough to even worry about? I don't hear much about them.

Or are you concerned about AWS/Vultr/Digital Ocean stealing your code? That seems like paranoia. They have world class developers, best in the industry. They don't want your code. This isn't the movie Antitrust.

Re: Show HN: Encrypted Git hosting should be easy

#18
post #7
post #3

Ignorance: What's the use-case for this? If you can't rely on the drives not to be tampered with, surely you also cannot rely on the CPU or kernel? Am I missing something?

This stores blobs in S3. So this is about not trusting hard drives which you have rented. Whether or not that makes sense depends on your threat model, but it seems reasonable to me that there are people who would find this useful.

The S3 in question may be not on AWS, but on any of the S3-compatible providers, or a non-public S3 store (in your company, university, your friend's NAS which you use as an extra backup, etc).

Re: Show HN: Encrypted Git hosting should be easy

#19

This is pretty cool as a new way to unbundle/change how people host git. While it's pretty AWS heavy now, some interfaces around the interaction and I can easily imagine this working with other providers (ex. Backblaze) and start shimming out the coordination pieces (currently Dynamo). Reminds me a lot of gitaly[0]. Awesome work! [0]: https://gitlab.com/gitlab-org/gitaly

thanks! git-remote-gcrypt has rclone support, which provides all possible backends. the addition here is a second object store with compare-and-swap semantics making it possible for multiple writers to collaborate safely. many infra providers have object storage with those semantics, my preference is aws.

> thanks! git-remote-gcrypt has rclone support, which provides all possible backends.

Oh that's awesome, I didn't catch the rclone support while skimming the README. rclone is such an excellent piece of software.

> the addition here is a second object store with compare-and-swap semantics making it possible for multiple writers to collaborate safely.

I think I must have misunderstood this point too -- the compare and swap semantics that you want are against dynamodb, right with raw/"dumb" storage on S3?

If I could request one thing it would be some extra interface files with "drivers" for the two concerns which are currently being handled by main.go... The locking mechanism and the raw storage mechanism.

Distilling the interface to these components would make it so easy for someone to come along and implement replacements! For example, one might like to see SQLite, FoundationDB, etc as metadata/synchronization drivers.

If there's a clear interface then it's easy to say "sure, send a commit with the implementation and we'll consider including it!", and leave implementation up to people who want the feature.

> many infra providers have object storage with those semantics, my preference is aws.

Yeah I bet this would work out of the box against other infra providers as well? S3 has basically become the defacto API everyone chases anyway.

Re: Show HN: Encrypted Git hosting should be easy

#20

Earlier quoted context omitted.

thanks! git-remote-gcrypt has rclone support, which provides all possible backends. the addition here is a second object store with compare-and-swap semantics making it possible for multiple writers to collaborate safely. many infra providers have object storage with those semantics, my preference is aws.

> thanks! git-remote-gcrypt has rclone support, which provides all possible backends. Oh that's awesome , I didn't catch the rclone support while skimming the README. rclone is such an excellent piece of software. > the addition here is a second object store with compare-and-swap semantics making it possible for multiple writers to collaborate safely. I think I must have misunderstood this point too -- the compare an…

dynamo holds a pointer to an object in s3 which records an ordered list of bundles.

compare-and-swap ensures that if two simultaneous pushes happen, only one will succeed. the other will have to pull first before retrying push.

there are actually a lot of providers with s3 and dynamo compatible apis. otherwise, fork and implement new provider! git-remote-CLOUD.

Post reply on HN