We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#690 After solve the fetch/pull error, I found that I still can not clone from remote.
os.environ['GIT_SSH_COMMAND'] = 'sudo ssh -v -i /root/key' with Git().custom_environment(GIT_SSH_COMMAND=os.environ['GIT_SSH_COMMAND']): repo = Repo.clone_from('[email protected]:somebody/someproject','test')
output:
DEBUG:git.cmd:Popen(['git', 'clone', '-v', '[email protected]:somebody/someproject', 'test'], cwd=/root/test/wel, universal_newlines=True, shell=None) DEBUG:git.repo.base:Cmd(['git', 'clone', '-v', '[email protected]:somebody/someproject', 'test'])'s unused stdout: Initialized empty Git repository in /root/test/.git/ DEBUG:git.cmd:AutoInterrupt wait stderr: 'Permission denied (publickey).\nfatal: The remote end hung up unexpectedly\n' Traceback (most recent call last): File "test.py", line 7, in <module> repo = Repo.clone_from('[email protected]:somebody/someproject','test') File "/usr/local/lib/python2.7/site-packages/git/repo/base.py", line 982, in clone_from return cls._clone(git, url, to_path, GitCmdObjectDB, progress, **kwargs) File "/usr/local/lib/python2.7/site-packages/git/repo/base.py", line 933, in _clone finalize_process(proc, stderr=stderr) File "/usr/local/lib/python2.7/site-packages/git/util.py", line 336, in finalize_process proc.wait(**kwargs) File "/usr/local/lib/python2.7/site-packages/git/cmd.py", line 418, in wait raise GitCommandError(self.args, status, errstr) git.exc.GitCommandError: Cmd('git') failed due to: exit code(128) cmdline: git clone -v [email protected]:somebody/someproject test stderr: 'Permission denied (publickey). fatal: The remote end hung up unexpectedly
The text was updated successfully, but these errors were encountered:
I would think creating a temporary instance of the Git command helper does not affect the clone_from call at all.
Git
clone_from
Instead you probably want to pass the environment directly when cloning as described in the docs.
I am closing this one assuming that will work for you. But please feel free to comment if that's not the case and it might be reopened.
Sorry, something went wrong.
No branches or pull requests
#690
After solve the fetch/pull error, I found that I still can not clone from remote.
output:
The text was updated successfully, but these errors were encountered: