I have been using python fabric for deploying my Django projects. Over the time the deployment has spanned multiple servers. The Fab script downloads code from git on the server and deploys. And it does that for every server.
My git access is through email and password. How can i avoid entering my email & password for each server every time i deploy? Git credentials cache doesn't seem to help.
I would like to avoid using SSH key based authentication for GIT.
For people coming to this question with fabric 2, I have found the following works:
from invoke import Responder
git_watchers = [
Responder(pattern = r"Username for .*", response="git_user\n"),
Responder(pattern = r"Password for .*", response="git_password\n") ]
ctxt.run("git fetch", pty=True, watchers=git_watchers)
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With