-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extension to support git https credentials #21
Comments
I'm afraid it is going to introduce too much complexity. And we would like to keep this project as much simple as possible. But I have never used the git https credential stores. Maybe it is simpler than I imagine. If you are willing to implement a PR without a guarantee that it will be accepted, so we can check it does not make the code more complex. Please do, otherwise sorry but keeping this project simple is really important for us. |
This implements dockito#21. It is a simple way to provide git credentials not only for ssh via keys, but also for https. In corporate settings with internet access through proxies, ssh is often not allowed and one is forced to use https. There are two ways to use this, either you provide a credential store and mount it when running `vault`. ``` docker run -p 172.17.0.1:14242:3000 -v $PWD/store:/vault/store vault ``` Alternatively you can also start the vault with an empty store and interactively add / remove credentials. ``` docker run -p 172.17.0.1:14242:3000 --name vault vault # the following prompts you for a username and password which are stored in the # running container docker exec -it vault credentials set github.com ``` The usage inside a `Dockerfile` is the same as for the ssh key. Simply prepend your `git clone` or other commands with `ONVAULT`. The changes are really fairly simple: - One route is added in `index.js` to download the file with the credentials. - ONVAULT is extended to download the additional file and configure git, as well as revert the changes after executing the passed command. - The `credential` helper script is added to the container. This is actually not essential, but more of a convenience such that you don't need to create the credential files manually. I did not yet update the README, but I can do that before merge if you are willing to include this addition. closes dockito#21
Have you considered to extend this to support git https credential stores? They could be served as credential store files via the http server just like the ssh keys. The ONVAULT command would then retrieve the file, configure git to use the credential store, execute the command, unconfigure git, remove the file.
If no, would you be willing to accept a pull request implementing this?
The text was updated successfully, but these errors were encountered: