feat: git https credentials for template leak into final repo
See original GitHub issueIs your feature request related to a problem? Please describe.
Currently, copier does not support Git HTTPS template URLs with included credentials. At least not without leaking these credentials into the .copier-answers.yml
file of the target repo.
I.e., commands like this are not a great idea, but there exists no workaround:
copier copy https://myuser:secretpw@myrepos.com/repo.git .
Describe the solution you’d like It would be great if credentials for cloning the template could be passed during runtime to copier (i.e. through env variables, cli arguments or separate secret files). For example with a command like:
copier copy \
--template-clone-username myuser
--template-clone-password secretpw
https://myrepos.com/repo.git .
These credentials should then not be saved in the target repo - but instead a future user running copier update
must supply his own credentials again.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Git push a branch by https url in bash - Stack Overflow
Since it is a private repo, I have to use the https URL to incorporate the system token to authenticate the push. However,...
Read more >gitcredentials Documentation - Git
Static configuration of usernames for a given authentication context. Credential helpers to cache or store passwords, or to interact with a system password...
Read more >Issues · copier-org/copier - GitHub
Library and command-line utility for rendering projects templates. ... feat: git https credentials for template leak into final repo enhancement.
Read more >Platform One / Big Bang / Customers / template · GitLab
This will deploy the BigBang HelmRelease and patch all above GitRepositories with the https-ca-credentials secret. # Save pull credentials into Git git add...
Read more >GitHub Leak: GitHub secrets best practices - GitGuardian Blog
Exposing secrets on GitHub: What to do after leaking credentials and API ... exposed a sensitive file or secrets to a public git...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
ok 😂 then this ticket is basically about allowing something similar to the SSH usecase, but when SSH is not an option.
This may happen in many cases, such as:
Or maybe Copier could detect when git is asking for credentials, and allow the user to input them. It would abort with an error if the
force
option (no-input option) is used.