You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi~ I can't use my id_rsa key to clone my repo.
this is my directory structure:
├── code
├── git_test.py
├── id_rsa
├── id_rsa.pub
└── ssh_executable.sh
I tried both methods and could not succeed clone repo.... if I move the id_resid_res.pub to ~/.ssh. it will success. hoping to get your help~
Traceback (most recent call last):
File "git_test.py", line 15, in <module>
repo = Repo.clone_from(git_url, out_dir, branch="master")
File "/Users/frank/miniconda3/lib/python3.7/site-packages/git/repo/base.py", line 988, in clone_from
return cls._clone(git, url, to_path, GitCmdObjectDB, progress, **kwargs)
File "/Users/frank/miniconda3/lib/python3.7/site-packages/git/repo/base.py", line 939, in _clone
finalize_process(proc, stderr=stderr)
File "/Users/frank/miniconda3/lib/python3.7/site-packages/git/util.py", line 333, in finalize_process
proc.wait(**kwargs)
File "/Users/frank/miniconda3/lib/python3.7/site-packages/git/cmd.py", line 415, in wait
raise GitCommandError(self.args, status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git clone --branch=master -v git@my.address.git ./code
stderr: 'Cloning into './code'...
git@gitlab.alipay-inc.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Activity
haofrank commentedon May 6, 2019
chmod 400 ~/.ssh/id_rsawork's fine.