Open lukeramsden opened 7 years ago
Yep, that sounds good to me. Maybe the docs should advise the creation of a separate deploy key, so people aren't adding their master private keys into heroku.
Maybe in addition to SSH_KEY
, we also include an SSH_KEY_PATH
for non-heroku installations and for testing?
path = path ssh will check for key
if SSH_KEY
write SSH_KEY to path
else if SSH_KEY_PATH
copy SSH_KEY_PATH to path
A PR would be awesome 😄 You should be able to test out ssh/go-get in Heroku with hk run bash --app myapp
After a bit more research, Bob Ziuchkovski's solution looks a lot simpler, so I'll go ahead and try that.
Looks good to me On Sun, 16 Apr 2017 at 11:10 pm Luke notifications@github.com wrote:
After a bit more research, Bob Ziuchkovski's solution https://gist.github.com/shurcooL/6927554 looks a lot simpler, so I'll go ahead and try that.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/jpillora/cloud-gox/issues/10#issuecomment-294351024, or mute the thread https://github.com/notifications/unsubscribe-auth/AAmr87PejbeiSiFoExvcrDBInBmP8_g_ks5rwhM0gaJpZM4M6OWG .
I'm not super familiar with executing commands from Go programs, but I've got this: https://github.com/lukeramsden/cloud-gox/blob/5e5f7cfa851d431b8008f41997924ba0a457c1be/handler/handler.go#L138 so far. It doesn't seem to be executing properly though, I'm not sure why. Any insight?
Alright I've got it working, I'll send a PR.
My idea is that, when we boot up the program, as well as all the other auth things, we have a little script that takes an
SSH_KEY
envar and writes it to a key file, then we run allgo get
command through anssh-agent
using that file.I'm happy to make a PR for this at some point.