News for hackers. Stuff that matters.
Re:You Already Have a Git Server by eqvinox on Sunday October 26, 2025 @09:32AM (#45711734)

  git clone ssh://username@hostname/path/to/repo
this is equivalent to:

  git clone username@hostname:path/to/repo
and if your usernames match between local and remote:

  git clone hostname:path/to/repo
(if the path has no leading /, it is relative to your home directory on the remote)
Re:You Already Have a Git Server by DrNefario on Monday October 27, 2025 @04:29AM (#45718552)
Git also respects your `~/.shh/config`, which lets you change settings per host. I've set up each of my GitHub accounts with a different "host" so it's easy to switch between them.
Re:You Already Have a Git Server by mlrtime on Monday October 27, 2025 @07:37AM (#45719796)
I never thought about this.. I've had the following problem in the past.

Host A, cannot reach official github.com. But Host B can and has a local copy of a repo cloned. So Host B can 'git clone ssh://' from Host A which is essentially equivalent, but just setting origin to Host B instead of github.com, sort of acting as a manual proxy?

What if Host A is natted, so Host B can ssh to Host A but not the reverse, can Host G ssh clone to Host A to push changes?

In the rare times I've needed this, I just 'rsync -av --delete' a repo from B->A.

Re:You Already Have a Git Server by eqvinox on Monday October 27, 2025 @10:01AM (#45721120)
You might want to read the documentation on "git remote". You can pull/fetch and push between repos quite arbitrarily, with plain ssh.