This dynamically adds SSH keys based on the URL passed, allowing clones to work with providers other than github and gitlab.
This was surprisingly complicated; I believe the combination of the entire URL being passed as a secret, which necessitates --no-cache, resulted in my preferred implementations not working (I suspect due to https://github.com/earthly/earthly/issues/2593). I assumed keeping the 'interface' intact was paramount (given that it's publicly documented); inlining all usage of the secret was the only thing that worked consistently.
You're welcome to close this, borrow from it for your own preferred implementation, etc. I at least wanted it to work for myself, so figured I'd share it.
This dynamically adds SSH keys based on the URL passed, allowing clones to work with providers other than github and gitlab.
This was surprisingly complicated; I believe the combination of the entire URL being passed as a secret, which necessitates
--no-cache
, resulted in my preferred implementations not working (I suspect due to https://github.com/earthly/earthly/issues/2593). I assumed keeping the 'interface' intact was paramount (given that it's publicly documented); inlining all usage of the secret was the only thing that worked consistently.You're welcome to close this, borrow from it for your own preferred implementation, etc. I at least wanted it to work for myself, so figured I'd share it.
Potential fix for #49