>
> But my servers are dynamic - always going up and down - and I couldn't
> find a github API to auto-sync the SSH keys.


Whatever you provision your servers with should include your deploy keys,
one static key which you use to clone the app… or what you did anyway:


> My workaround was to create a new github user, then add that user as a
> collaborator to the private repo.  This gives the user read-only access to
> the private repo.  I embed the collaborator username/password in my cap
> script, and everything works.


That's pretty much the only way to do it, Github don't provide API keys for
the repository level, you have to make a deploy collaborator account.

Lee Hambley
--
http://lee.hambley.name/
+49 (0) 170 298 5667


On 7 November 2013 16:18, Andy L <[email protected]> wrote:

> My source code is stored on a github private repo.  So I ran into an
> issue: how to clone from the private repo.  Normally I would upload the SSH
> keys to to github and be done with it.
>
> But my servers are dynamic - always going up and down - and I couldn't
> find a github API to auto-sync the SSH keys.
>
> My workaround was to create a new github user, then add that user as a
> collaborator to the private repo.  This gives the user read-only access to
> the private repo.  I embed the collaborator username/password in my cap
> script, and everything works.
>
> To make the https username/password a little more clean, I'm setting up a
> .netrc file as part of my cap3 deploy:
>
>   desc "Setup .netrc"
>    task :netrc do |task|
>      on roles(:all) do |host|
>        execute "echo 'machine github.com login <username> password
> #{ENV['<password>']}' > ~/.netrc"
>      end
>    end
>
> So - this approach is working 100% fine.
>
> But can it be better?  Lee says he hates using https, and I agree.  Is
> there a better solution for cloning/pulling from a Github private repo?
>
>  --
> --
> * You received this message because you are subscribed to the Google
> Groups "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to
> [email protected] For more options, visit this
> group at http://groups.google.com/group/capistrano?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to