René's URL Explorer Experiment


Title: can't clone use ssh key · Issue #866 · gitpython-developers/GitPython · GitHub

Open Graph Title: can't clone use ssh key · Issue #866 · gitpython-developers/GitPython

X Title: can't clone use ssh key · Issue #866 · gitpython-developers/GitPython

Description: 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 git_test.py import os import git from git import Repo from git import Git git_url = ...

Open Graph Description: 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 git_test.py import os import git from git im...

X Description: 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 git_test.py import os import git from gi...

Opengraph URL: https://github.com/gitpython-developers/GitPython/issues/866

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"can't clone use ssh key","articleBody":"**hi~ I can't use my id_rsa key to clone my repo.\r\nthis is my directory structure:**\r\n├── code\r\n├── git_test.py\r\n├── id_rsa\r\n├── id_rsa.pub\r\n└── ssh_executable.sh\r\n\r\n\u003e git_test.py\r\n``` python\r\nimport os\r\nimport git\r\nfrom git import Repo\r\nfrom git import Git\r\n\r\ngit_url = \"git@xxx/xxx.git\"\r\ngit_branch = \"master\"\r\nout_dir = \"./code\"\r\n\r\n# One\r\ngit_ssh_identity_file = os.path.expanduser('./id_rsa')\r\ngit_ssh_cmd = 'ssh -i %s' % git_ssh_identity_file\r\n\r\nwith Git().custom_environment(GIT_SSH_COMMAND=git_ssh_cmd):\r\n  repo = Repo.clone_from(git_url, out_dir, branch=\"master\")\r\n  print(\"Success\")\r\n\r\n# Two\r\nssh_executable = os.path.join(\"./\", 'ssh_executable.sh')\r\n\r\nwith Git().custom_environment(GIT_SSH=ssh_executable):\r\n  repo = Repo.clone_from(git_url, out_dir, branch=\"master\")\r\n  print(\"Success\")\r\n```\r\n\u003essh_executable.sh\r\n```shell\r\n#!/bin/sh\r\nID_RSA=\"./id_rsa\"\r\nexec /usr/bin/ssh -o StrictHostKeyChecking=no -i $ID_RSA \"$@\"\r\n```\r\n\r\n **I tried both methods and could not succeed clone repo....** \r\n **if I move the `id_res` `id_res.pub` to `~/.ssh`. it will success. hoping to get your help~**\r\n```\r\nTraceback (most recent call last):\r\n  File \"git_test.py\", line 15, in \u003cmodule\u003e\r\n    repo = Repo.clone_from(git_url, out_dir, branch=\"master\")\r\n  File \"/Users/frank/miniconda3/lib/python3.7/site-packages/git/repo/base.py\", line 988, in clone_from\r\n    return cls._clone(git, url, to_path, GitCmdObjectDB, progress, **kwargs)\r\n  File \"/Users/frank/miniconda3/lib/python3.7/site-packages/git/repo/base.py\", line 939, in _clone\r\n    finalize_process(proc, stderr=stderr)\r\n  File \"/Users/frank/miniconda3/lib/python3.7/site-packages/git/util.py\", line 333, in finalize_process\r\n    proc.wait(**kwargs)\r\n  File \"/Users/frank/miniconda3/lib/python3.7/site-packages/git/cmd.py\", line 415, in wait\r\n    raise GitCommandError(self.args, status, errstr)\r\ngit.exc.GitCommandError: Cmd('git') failed due to: exit code(128)\r\n  cmdline: git clone --branch=master -v git@my.address.git ./code\r\n  stderr: 'Cloning into './code'...\r\ngit@gitlab.alipay-inc.com: Permission denied (publickey).\r\nfatal: Could not read from remote repository.\r\n\r\nPlease make sure you have the correct access rights\r\nand the repository exists.\r\n```","author":{"url":"https://github.com/haofrank","@type":"Person","name":"haofrank"},"datePublished":"2019-04-29T13:22:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/866/GitPython/issues/866"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:4786d0fa-1081-aa29-9237-b18b0a7b873b
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDF72:3DDD4:1164268:174A1A2:6A59B700
html-safe-nonce72a511683e5fef7e230c54159236efec21e08373c69cd4bc020120e71223f6f5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjcyOjNEREQ0OjExNjQyNjg6MTc0QTFBMjo2QTU5QjcwMCIsInZpc2l0b3JfaWQiOiI1MjgwOTE1MTcxMzAwNzE4MzM2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac42a0a624ec2ddafceca14d45f587ed15e073185c2578be000d40c6fc28a10937
hovercard-subject-tagissue:438312935
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/gitpython-developers/GitPython/866/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9599a40958b03b6ff93a44ba0281fd7ceb1dda77077bd31c5c232ecf6023b6ef/gitpython-developers/GitPython/issues/866
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9599a40958b03b6ff93a44ba0281fd7ceb1dda77077bd31c5c232ecf6023b6ef/gitpython-developers/GitPython/issues/866
og:image:althi~ 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 git_test.py import os import git from git im...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamehaofrank
hostnamegithub.com
expected-hostnamegithub.com
Noneba3976babb66479b1c943a8edc0777d96157da48fadc0161f9ddb219deee8353
turbo-cache-controlno-preview
go-importgithub.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git
octolytics-dimension-user_id503709
octolytics-dimension-user_logingitpython-developers
octolytics-dimension-repository_id1126087
octolytics-dimension-repository_nwogitpython-developers/GitPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1126087
octolytics-dimension-repository_network_root_nwogitpython-developers/GitPython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseab680789ae4a316cdaf0d5a292a1760140931cc4
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/gitpython-developers/GitPython/issues/866#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fissues%2F866
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fissues%2F866
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=gitpython-developers%2FGitPython
Reloadhttps://github.com/gitpython-developers/GitPython/issues/866
Reloadhttps://github.com/gitpython-developers/GitPython/issues/866
Reloadhttps://github.com/gitpython-developers/GitPython/issues/866
Please reload this pagehttps://github.com/gitpython-developers/GitPython/issues/866
gitpython-developers https://github.com/gitpython-developers
GitPythonhttps://github.com/gitpython-developers/GitPython
Please reload this pagehttps://github.com/gitpython-developers/GitPython/issues/866
Notifications https://github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Fork 982 https://github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Star 5.1k https://github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Code https://github.com/gitpython-developers/GitPython
Issues 164 https://github.com/gitpython-developers/GitPython/issues
Pull requests 9 https://github.com/gitpython-developers/GitPython/pulls
Discussions https://github.com/gitpython-developers/GitPython/discussions
Actions https://github.com/gitpython-developers/GitPython/actions
Security and quality 12 https://github.com/gitpython-developers/GitPython/security
Insights https://github.com/gitpython-developers/GitPython/pulse
Code https://github.com/gitpython-developers/GitPython
Issues https://github.com/gitpython-developers/GitPython/issues
Pull requests https://github.com/gitpython-developers/GitPython/pulls
Discussions https://github.com/gitpython-developers/GitPython/discussions
Actions https://github.com/gitpython-developers/GitPython/actions
Security and quality https://github.com/gitpython-developers/GitPython/security
Insights https://github.com/gitpython-developers/GitPython/pulse
can't clone use ssh keyhttps://github.com/gitpython-developers/GitPython/issues/866#top
https://github.com/haofrank
haofrankhttps://github.com/haofrank
on Apr 29, 2019https://github.com/gitpython-developers/GitPython/issues/866#issue-438312935
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.