-
Hi, I'm trying to write a script and running the script on a linux box. I need to use an user account to connect to the git repo Currently I'm using below command to clone the repo:
The clone command works fine .But I need to commit changes and push the changes under this user account. Any suggestion? |
Beta Was this translation helpful? Give feedback.
Answered by
Byron
May 27, 2021
Replies: 1 comment
-
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. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Byron
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the documentation about remotes you will find this:
which applies to pushes as well.