-
I have a local repository that I've already cloned and I want to push changes to remote (GitHub) from a different account. id_file = os.path.expanduser('~/.ssh/id_rsa_api')
id_cmd = "ssh -i " + id_file
repo = Repo(path)
with repo.git.custom_environment(GIT_SSH_COMMAND=id_cmd):
# rest of code here but it's had no effect - the commits always are pushed under my main GiitHub account, no matter what SSH key I use. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Did the GIT_SSH_COMMAND environment variable have an effect when running From the code I see here I would expect this to be picked up when interacting with remotes. |
Beta Was this translation helpful? Give feedback.
-
@jmkd3v wrote
|
Beta Was this translation helpful? Give feedback.
@jmkd3v wrote