This might be the wrong place, but I'm giving it a shot
I'm looking for a way auto-authenticate myself to allow for pushing from a post-hook .... hmm
that is
Dev -> push -> private git -> post-hook (push) -> appharbor
but since appharbor is https and requires a password, I'm wondering where to store the password (if possible)
hope this scenario make sense - I might be going down the wrong path I don't know
#1 Posted by rune Support staff on 07 Apr, 2011 10:46 AM
Hi Dennis,
I think it's difficult to archive without exposing the password in clear text one way or the other. One way you could archive this would be by adding the password after the username in your repository url like this: https://username:[email blocked]/your-app-name.git - this way the post-hook won't be queried for a password.
I'm not sure I would really recommend this approach though. There could be several reasons that your private repo and AppHarbor repo would not be consistent and your post-hook would have to take care of that. If, for instance, a collaborator on your application has pushed a newer version directly to AppHarbor and you push a new version to you private repo, there would be a conflict when your post-hook tries to push to AppHarbor.
Here at AppHarbor we also use a private git repo. We always push new revisions to our private repo first and then push to AppHarbor if the change needs to be deployed. I don't really consider that to be to much overhead though we have to push twice as we may not always want to automatically deploy after a change to our "working repo".
I'm very interested in hearing more about the use case for a post-commit hook though? We would like to support good practices and I definitely think it's a good idea to have a hosted/private git repository separate from the one hosted on AppHarbor.
Best,
Rune
#2 Posted by dennismi on 07 Apr, 2011 11:26 AM
Hi Rune
I'm the only one with access to the private repo, and i wish to push every change to appharbor that i push to the private repo.
I see your point though, 'git push origin master && git push appharbor master' could easily be aliased :)
But thanks for the heads up on the username/pw in the url .. will have to try it
//dennis
#3 Posted by rune Support staff on 07 Apr, 2011 11:32 AM
Yeah, aliasing the command might be the best way to go! :-)
Best,
Rune
rune closed this discussion on 07 Apr, 2011 11:32 AM.