We are using gitolite to manage our repositories and one of our heroku project's have git submodules. Is there a way to get Heroku's public key for the authentication?
Thanks, David
We are using gitolite to manage our repositories and one of our heroku project's have git submodules. Is there a way to get Heroku's public key for the authentication?
Thanks, David
No, probably not. Instead, you can use HTTPS basic authentication when you create the submodule in your git repository, similar to deploying private gems to Heroku. Looks something like this:
git submodule add https://username:password@github.com/username/repo.git
You can also commit a .ssh directory containing a dedicated id_rsa key ("deployment key") that is registered with github, either with your account or a dedicated deployment account. Don't forget to chmod 0660
the key.
There is another solution to @kanzure approach: https://stackoverflow.com/a/29464430/990356
Go to Settings > Personal access tokens and generate a personal access token with repo
scope enabled.
Now you can do git clone https://MY_TOKEN@github.com/user-or-org/repo
and in the case of a submodule git submodule add https://MY_TOKEN@github.com/user-or-org/repo
Pros:
Cons: