Skip to content

How can I commit and push the commit under another user's name? #1257

Answered by Byron
scriptxyz asked this question in Q&A
Discussion options

You must be logged in to vote

In the documentation about remotes you will find this:

ssh_cmd = 'ssh -i id_deployment_key'
with repo.git.custom_environment(GIT_SSH_COMMAND=ssh_cmd):
    repo.remotes.origin.fetch()

which applies to pushes as well.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Byron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants