On Win11 cloning repository fails. #206390
Replies: 6 comments 9 replies
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
This comment was marked as low quality.
This comment was marked as low quality.
This comment was marked as low quality.
This comment was marked as low quality.
|
Hi Ama,
Thank you for your reply.
I think that the main problem is that msys-2.0.dll is not allowed to load. I have seen this before on a different windows computer. Scrubbed internet for this problem and it seems that an organization issued computer as configured by IT will block the capability of running bash.exe or git.exe.
Copilot's summary:
Nothing was ever wrong with your GitHub account, tokens, SSH keys, URLs, or network. Your Git for Windows installation is broken at the shell level — almost certainly because your organization's security software (AppLocker, Windows Defender Application Control, or an antivirus/EDR policy) is blocking the MSYS2 shell executables (sh.exe, bash.exe) inside %LOCALAPPDATA%\Programs\Git.
Thanks for the help.
By the way, I could not see your discussion thread on the community platform as I did Nariv's discussion. So, I am writing to you directly.
I wish GitHub would create a Window installer that works!
Elizabeth
…________________________________
From: Ama Senevirathne ***@***.***>
Sent: Friday, September 4, 2026 3:59 AM
To: community/community ***@***.***>
Cc: Toth, Elizabeth ***@***.***>; Mention ***@***.***>
Subject: Re: [community/community] On Win11 cloning repository fails. (Discussion #206390)
Caution: This External email originated from outside of Dynex Technologies. Please take care when clicking links or opening attachments. When in doubt, please contact the IT ***@***.***>.
On Windows 11, the most common reason ssh -T ***@***.*** succeeds while git ls-remote gets denied is the Dual-SSH Client Conflict between Windows native OpenSSH and Git for Windows.
Here is what is happening and the 60-second fix.
________________________________
The Root Cause: Windows OpenSSH vs Git's Bundled SSH
When you test in PowerShell with ssh -T ***@***.***:
* Windows executes C:\Windows\System32\OpenSSH\ssh.exe.
* It successfully picks up your key in C:\Users\<user>\.ssh\id_ed25519 (or from the Windows ssh-agent service) and GitHub greets you as Zsike123.
However, when you run git ls-remote or git clone:
* Git for Windows does not use the Windows System32 SSH client by default; it uses its own bundled MinGW SSH client (C:\Program Files\Git\usr\bin\ssh.exe).
* If Git's internal SSH client is looking in a different HOME directory (e.g. HOMEDRIVE/HOMEPATH pointing to a network drive or OneDrive instead of USERPROFILE), it finds no keys, offers empty credentials, and GitHub returns:
ERROR: Repository not found. / Permission to Zsike123/Amdaderosz.git denied.
________________________________
Step 1: Force Git to Use the Windows System SSH Client
Tell Git to explicitly use the exact same Windows SSH client that just succeeded in your terminal:
git config --global core.sshCommand "C:/Windows/System32/OpenSSH/ssh.exe"
Now retry:
git ls-remote ***@***.***:Zsike123/Amdaderosz.git
________________________________
Step 2: See What Key Git is Actually Sending
If it still fails, run this one command in PowerShell to see the raw handshake from Git's perspective:
$env:GIT_SSH_COMMAND="ssh -vvv"
git ls-remote ***@***.***:Zsike123/Amdaderosz.git
Inspect the output lines for:
1. Offering public key: ...: Check the exact file path. Is it actually offering the key registered to Zsike123?
2. Deploy Key Collision: If you added this same SSH key as a Deploy Key to any other repository, GitHub will authenticate the connection using the Deploy Key identity (which is strictly scoped to only one repo) rather than your personal user account. (An SSH key can either be an Account Key or a Deploy Key, never both).
________________________________
Step 3: PowerShell Colon Escaping
In PowerShell, strings containing :Z can sometimes be interpreted as drive scopes. Always quote the full SSH connection string:
git clone ***@***.***:Zsike123/Amdaderosz.git'
(Or test over HTTPS via GitHub CLI to verify access: gh repo clone Zsike123/Amdaderosz).
—
Reply to this email directly, view it on GitHub<#206390?email_source=notifications&email_token=BHYNWWOQPOYE3HITYJMRBIL5NJY4NA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCOBSHAZDSNJSUZZGKYLTN5XKO3LFNZ2GS33OUVSXMZLOOSWGM33PORSXEX3DNRUWG2Y#discussioncomment-18282952>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BHYNWWL5RTDWRBVSH6TQZ6D5NJY4NAVCNFSNUABIKJSXA33TNF2G64TZHMZTAMJVG4ZTGNBUHNCGS43DOVZXG2LPNY5TCMBXGI2DCOBSUF3AE>.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS<https://github.com/notifications/mobile/ios/BHYNWWNIRPHROXCKRFFIA535NJY4NA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCOBSHAZDSNJSUZZGKYLTN5XKO3LFNZ2GS33OUVSXMZLOOSVGM33PORSXEX3JN5ZQ> and Android<https://github.com/notifications/mobile/android/BHYNWWKDNEBGH6ROGQJASKD5NJY4NA5CNFSNUABIM5UWIORPF5TWS5BNNB2WEL2ENFZWG5LTONUW63SDN5WW2ZLOOQXTCOBSHAZDSNJSUZZGKYLTN5XKO3LFNZ2GS33OUVSXMZLOOSXGM33PORSXEX3BNZSHE33JMQ>. Download it today!
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
Yeah, if ssh -T git@github.com is authenticating as Zsike123, then the SSH key itself seems to be working. The weird part is that git ls-remote is getting denied even though you can access the repo in the browser. I'd double-check that the SSH key you're testing is actually attached to the same GitHub account that has access to the repo, especially if there are multiple GitHub accounts or keys configured on the PC. You could also try: git remote -v and ssh -vT git@github.com The verbose SSH output might show which key Windows is actually offering. If the account and permissions are definitely correct and ssh -T still says you're the right user while ls-remote gets denied, then yeah, it could be something GitHub needs to investigate rather than a normal clone/setup issue. Hope you get it figured out! |
|
The problem got resolved after organization IT whitelisted the said libraries. The GitHub installation withing organization's computer if GitHub would be implemented based on components that are more native to Windows. GitHub is native more to Linux environments, less to Windows and that shows. Windows people are a bit handicapped when dealing with software stemming from open-source world. Thank you for your help. |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Bug
Body
After many hours using Copilot chat, I am still unable to clone the repository on a windows 11 pc. Here is the status given by the agent, indicating that this merits a bug report.
ssh -T git@github.com authenticates as Zsike123.
The SSH key is accepted by GitHub.
git ls-remote git@github.com:Zsike123/Amdaderosz.git is denied.
The repository is visible in the browser as Zsike123/Amdaderosz.
Attaching the conversation with agent.
github-clone-troubleshooting.md
All reactions