Title: On Windows only, operations fail using ssh with PKI · gitpython-developers/GitPython · Discussion #1966 · GitHub
Open Graph Title: On Windows only, operations fail using ssh with PKI · gitpython-developers/GitPython · Discussion #1966
X Title: On Windows only, operations fail using ssh with PKI · gitpython-developers/GitPython · Discussion #1966
Description: On Windows only, operations fail using ssh with PKI
Open Graph Description: I am updating code that was previously Linux-only to support Windows, and my tests are failing on Windows with errors like ERROR: Cmd('git') failed due to: exit code(128) cmdline: git clone -v -- s...
X Description: I am updating code that was previously Linux-only to support Windows, and my tests are failing on Windows with errors like ERROR: Cmd('git') failed due to: exit code(128) cmdline: git clone...
Opengraph URL: https://github.com/gitpython-developers/GitPython/discussions/1966
X: @github
Domain: user:token@github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"On Windows only, operations fail using ssh with PKI","text":"\u003cp dir=\"auto\"\u003eI am updating code that was previously Linux-only to support Windows, and my tests are failing on Windows with errors like\u003c/p\u003e\n\u003cdiv class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"ERROR: Cmd('git') failed due to: exit code(128)\n cmdline: git clone -v -- ssh://\u0026lt;redacted\u0026gt; C:\\Users\\stevjorg\\AppData\\Local\\Temp\\clitest-qevu7qrx\n stderr: 'Cloning into 'C:\\Users\\stevjorg\\AppData\\Local\\Temp\\clitest-qevu7qrx'...\nPermission denied, please try again.\nPermission denied, please try again.\n\u0026lt;redacted\u0026gt;: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\"\u003e\u003cpre class=\"notranslate\"\u003e\u003ccode class=\"notranslate\"\u003eERROR: Cmd('git') failed due to: exit code(128)\n cmdline: git clone -v -- ssh://\u0026lt;redacted\u0026gt; C:\\Users\\stevjorg\\AppData\\Local\\Temp\\clitest-qevu7qrx\n stderr: 'Cloning into 'C:\\Users\\stevjorg\\AppData\\Local\\Temp\\clitest-qevu7qrx'...\nPermission denied, please try again.\nPermission denied, please try again.\n\u0026lt;redacted\u0026gt;: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eI can successfully execute the same command that is shown for \"cmdline:\" manually at the Windows command prompt.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe connection uses ssh keys, so no password is used/needed.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eAny ideas?\u003c/p\u003e","upvoteCount":1,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"\u003cp dir=\"auto\"\u003eI finally figured out the problem. I was running this through WinPython, and its batch files that set the environment prior to running python.exe assign a value to HOME (that is not the current user's home directory). Apparently, that confuses ssh because when I tweaked my process for starting python.exe in WinPython to clear the HOME variable, that fixed the problem.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e…so the problem has nothing to do with GitPython, but others attempting to use GitPython under WinPython will likely encounter the same problem.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eMy specific fix was to stop using WinPython's scripts/python.bat to run Python and to instead call its scripts/env.bat to set up the environment, then \u003ccode class=\"notranslate\"\u003eSET HOME=\u003c/code\u003e, then execute \u003ccode class=\"notranslate\"\u003eif not \"%WINPYWORKDIR%\"==\"%WINPYWORKDIR1%\" cd %WINPYWORKDIR1%\u003c/code\u003e followed by \u003ccode class=\"notranslate\"\u003e\"%WINPYDIR%\\python.exe\" %*\u003c/code\u003e as scripts/python.bat would do.\u003c/p\u003e","upvoteCount":1,"url":"https://github.com/gitpython-developers/GitPython/discussions/1966#discussioncomment-10847016"}}}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:638abb19-0e17-31d6-25f5-a9130a37a25c |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | B8B6:3C042B:11ACFDC:17664CF:6B065809 |
| html-safe-nonce | 0b44043e7cc7ea9891fd9b0ca4414de813132bc2248182ea35b7fbccb1ec3ada |
| visitor-payload | eyJyZWZlcnJlciI6bnVsbCwicmVxdWVzdF9pZCI6IkI4QjY6M0MwNDJCOjExQUNGREM6MTc2NjRDRjo2QjA2NTgwOSIsInZpc2l0b3JfaWQiOiI3MTcyNzUxMDc0Mzg1MDkwNTY5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiY2VudHJhbHVzIn0= |
| visitor-hmac | 8f83ab28e73b933adc087db5d5c80eed01e0553a5182113f4d7ee5d5fd032134 |
| hovercard-subject-tag | discussion:7274989 |
| github-keyboard-shortcuts | repository,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/gitpython-developers/GitPython/1966/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/4e715fe560a41397e83d8f2ffb43f85f768adef45986fb05e4301c70469a7c43/gitpython-developers/GitPython/discussions/1966 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4e715fe560a41397e83d8f2ffb43f85f768adef45986fb05e4301c70469a7c43/gitpython-developers/GitPython/discussions/1966 |
| og:image:alt | I am updating code that was previously Linux-only to support Windows, and my tests are failing on Windows with errors like ERROR: Cmd('git') failed due to: exit code(128) cmdline: git clone -v -- s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6324e6ac990fb6befbec840cc0e102a1071c339bfe8f9826bb12de2e3ba1d297 |
| turbo-cache-control | no-preview |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7f0aa75f4141d440c6110dc31af7ea7797abb6c4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width