Dynamic & resilient git remotes with doink
(absolutely-vivid.srht.site)
from absolutely_vivid@programming.dev to programming@programming.dev on 18 Apr 16:44
https://programming.dev/post/49019468
from absolutely_vivid@programming.dev to programming@programming.dev on 18 Apr 16:44
https://programming.dev/post/49019468
Hey, I made a thing! It’s called doink. Doink gives you dynamic git remotes by using DNS TXT records as pointers.
I wrote a bit about how it works and what it’s useful for.
Anyway, do you ever thing about how DNS is a basically a decentralized key-value database? I think about it a lot :)
#programming
threaded - newest
“Scientific Progress Goes Doink!”
<img alt="" src="https://i.gr-assets.com/images/S/compressed.photo.goodreads.com/books/1386924034i/70488._UY630_SR1200,630_.jpg">
Yoink! New project logo haha ;P
If you have control of the dns server, why do you need the bash script? Just create a CNAME record pointing to the current remote.
Great question! I considered that, it’s what lead me to the idea to use DNS in the first place. The problem I had with that is that the ultimate URL path might change, not just the hostname. What happens if a repo has to move from
github.com/org/repotomycoolforge.net/repo?But there’s also another reason that I realized as I was working out the details of git-remote-helpers: What happens if your remote needs to change protocols? With doink you can swap from http(s) to ftp with an ip address instead of a hostname, or perhaps even some (future) git-over-whatever-p2p-network.
So yeah if you’re swapping from a github-style forge to another github-style forge and you don’t need the flexibility, you definitely could just CNAME it! And that would probably be more robust, but it would also give you less future flexibility :P