GIT ERROR: fatal: unable to access 'https://dev.azure.com/****/': Recv failure: Connection was reset while cloning
Asked Answered
Q

7

7

Cloning a repository, pushing , fetching and pulling code with git from Azure Devops via VSCODE, GITExtensions, GIT BASH results in a 'fatal unable to access' & 'CONNECTION WAS RESET' ERROR around 80% of the times. Sometimes it works and while spamming the 'git push' command it works 1 out of 20 times but it's random.

I need help in resolving this 'Connection Was Reset' since i'm unable to work for my client.

For more info, please refer to: https://github.com/git-ecosystem/git-credential-manager/issues/1150 I already explained the information here aswell

Additional Logs (dedacted):

Diagnose log at 2023-03-14T09:30:54Z

AppPath: C:\Program Files\Git\mingw64\bin\git-credential-manager-core.exe
InstallDir: C:\Program Files\Git\mingw64\bin\
Version: 2.0.886+ea93cb5158

------------
Diagnostic: Environment
Skipped: False
Success: True
Exception: None
Log:
OSType: Windows
OSVersion: 10.0 (build 22621)
Reading environment variables... OK
 Variables:
HOMEPATH=\Users\eerae
DriverData=C:\Windows\System32\Drivers\DriverData
COMPUTERNAME=ESECONSULTING
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
OneDrive=C:\Users\eerae\OneDrive
TMP=C:\Users\eerae\AppData\Local\Temp
HOME=C:\Users\eerae
PROCESSOR_REVISION=9a03
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
GIT_EXEC_PATH=C:/Program Files/Git/mingw64/libexec/git-core
TEMP=C:\Users\eerae\AppData\Local\Temp
LOCALAPPDATA=C:\Users\eerae\AppData\Local
MSYSTEM=MINGW64
TERM=xterm-256color
COLORTERM=truecolor
USERDOMAIN=ESECONSULTING
ProgramFiles(x86)=C:\Program Files (x86)
Path=C:/Program Files/Git/mingw64/libexec/git-core;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\eerae\bin;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files (x86)\GitExtensions\;C:\Users\eerae\AppData\Local\Microsoft\WindowsApps;;C:\Users\eerae\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\eerae\.dotnet\tools
PROCESSOR_LEVEL=6
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 154 Stepping 3, GenuineIntel
TMPDIR=C:\Users\eerae\AppData\Local\Temp
PROMPT=$P$G
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public
NUMBER_OF_PROCESSORS=20
CommonProgramFiles=C:\Program Files (x86)\Common Files
PLINK_PROTOCOL=ssh
ProgramData=C:\ProgramData
ProgramW6432=C:\Program Files
ProgramFiles=C:\Program Files (x86)
SystemRoot=C:\Windows
SESSIONNAME=Console
LC_CTYPE=C.UTF-8
CommonProgramW6432=C:\Program Files\Common Files
ZES_ENABLE_SYSMAN=1
LOGONSERVER=\\ESECONSULTING
USERPROFILE=C:\Users\eerae
USERDOMAIN_ROAMINGPROFILE=ESECONSULTING
APPDATA=C:\Users\eerae\AppData\Roaming
HOMEDRIVE=C:
EXEPATH=C:\Program Files\Git
USERNAME=eerae
PROCESSOR_ARCHITEW6432=AMD64
PROCESSOR_ARCHITECTURE=x86
OS=Windows_NT
ComSpec=C:\Windows\system32\cmd.exe
SystemDrive=C:
windir=C:\Windows
OneDriveConsumer=C:\Users\eerae\OneDrive
ALLUSERSPROFILE=C:\ProgramData


------------
Diagnostic: File system
Skipped: False
Success: True
Exception: None
Log:
Temporary directory is 'C:\Users\eerae\AppData\Local\Temp\'...
Checking basic file I/O...
Writing to temporary file 'C:\Users\eerae\AppData\Local\Temp\a34f41c181a0608037415d3a'... OK
Reading from temporary file 'C:\Users\eerae\AppData\Local\Temp\a34f41c181a0608037415d3a'... OK
Deleting temporary file 'C:\Users\eerae\AppData\Local\Temp\a34f41c181a0608037415d3a'... OK
Testing IFileSystem instance...
UserHomePath: C:\Users\eerae
UserDataDirectoryPath: C:\Users\eerae\.gcm
GetCurrentDirectory(): C:\Work\Repos

------------
Diagnostic: Networking
Skipped: False
Success: True
Exception: None
Log:
Checking networking and HTTP stack...
Creating HTTP client... OK
IsNetworkAvailable: True
Sending HEAD request to http://example.com... OK
Sending HEAD request to https://example.com... OK
Acquiring free TCP port... OK
Testing local HTTP loopback connections...
Creating new HTTP listener for http://localhost:58764/... OK
Waiting for loopback connection... OK
Writing response... OK
Waiting for response data... OK
Loopback connection data OK

------------
Diagnostic: Git
Skipped: False
Success: True
Exception: None
Log:
Getting Git version... OK
Git version is '2.39.2.windows.1'
Locating current repository... OK
Not inside a Git repository.
Listing all Git configuration... OK
Git configuration:
file:C:/Program Files/Git/etc/gitconfig diff.astextplain.textconv=astextplain
file:C:/Program Files/Git/etc/gitconfig filter.lfs.clean=git-lfs clean -- %f
file:C:/Program Files/Git/etc/gitconfig filter.lfs.smudge=git-lfs smudge -- %f
file:C:/Program Files/Git/etc/gitconfig filter.lfs.process=git-lfs filter-process
file:C:/Program Files/Git/etc/gitconfig filter.lfs.required=true
file:C:/Program Files/Git/etc/gitconfig http.sslbackend=openssl
file:C:/Program Files/Git/etc/gitconfig http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
file:C:/Program Files/Git/etc/gitconfig core.autocrlf=true
file:C:/Program Files/Git/etc/gitconfig core.fscache=true
file:C:/Program Files/Git/etc/gitconfig core.symlinks=false
file:C:/Program Files/Git/etc/gitconfig pull.rebase=false
file:C:/Program Files/Git/etc/gitconfig credential.helper=manager
file:C:/Program Files/Git/etc/gitconfig credential.https://dev.azure.com.usehttppath=true
file:C:/Program Files/Git/etc/gitconfig init.defaultbranch=master
file:C:/Users/eerae/.gitconfig  core.editor="C:/Users/eerae/AppData/Local/Programs/Microsoft VS Code/bin/code" --wait
file:C:/Users/eerae/.gitconfig  core.compression=0
file:C:/Users/eerae/.gitconfig  user.name=Senne Eeraerts
file:C:/Users/eerae/.gitconfig  user.email=**@***.com
file:C:/Users/eerae/.gitconfig  user.password=***.
file:C:/Users/eerae/.gitconfig  https.postbuffer=1048576000
file:C:/Users/eerae/.gitconfig  merge.guitool=vscode
file:C:/Users/eerae/.gitconfig  mergetool.vscode.path=C:/Users/eerae/AppData/Local/Programs/Microsoft VS Code/Code.exe
file:C:/Users/eerae/.gitconfig  mergetool.vscode.cmd="C:/Users/eerae/AppData/Local/Programs/Microsoft VS Code/Code.exe" --wait --merge "$REMOTE" "$LOCAL" "$BASE" "$MERGED"
file:C:/Users/eerae/.gitconfig  pull.rebase=false
file:C:/Users/eerae/.gitconfig  fetch.prune=false
file:C:/Users/eerae/.gitconfig  rebase.autostash=false
file:C:/Users/eerae/.gitconfig  rebase.autosquash=false
file:C:/Users/eerae/.gitconfig  rebase.updaterefs=false
file:C:/Users/eerae/.gitconfig  diff.guitool=vscode
file:C:/Users/eerae/.gitconfig  difftool.vscode.path=C:/Users/eerae/AppData/Local/Programs/Microsoft VS Code/Code.exe
file:C:/Users/eerae/.gitconfig  difftool.vscode.cmd="C:/Users/eerae/AppData/Local/Programs/Microsoft VS Code/Code.exe" --wait --diff "$LOCAL" "$REMOTE"
file:C:/Users/eerae/.gitconfig  http.sslverify=true
file:C:/Users/eerae/.gitconfig  http.postbuffer=524288000
file:C:/Users/eerae/.gitconfig  gui.recentrepo=C:/Work/Repos/Integration/Integration
file:C:/Users/eerae/.gitconfig  credential.helper=store


------------
Diagnostic: Credential storage
Skipped: False
Success: True
Exception: None
Log:
ICredentialStore instance is of type: CredentialStore
Writing test credential... OK
Reading test credential... OK
Deleting test credential... OK

------------
Diagnostic: Microsoft authentication (AAD/MSA)
Skipped: False
Success: True
Exception: None
Log:
Broker not supported.
Flow type is: Auto
Gathering MSAL token cache data... OK
CacheDirectory: C:\Users\eerae\AppData\Local\.IdentityService
CacheFileName: msal.cache
CacheFilePath: C:\Users\eerae\AppData\Local\.IdentityService\msal.cache
Creating cache helper... OK
Verifying MSAL token cache persistence... OK

------------
Diagnostic: GitHub API
Skipped: False
Success: True
Exception: None
Log:
Using 'https://github.com/' as API target.
Querying '/meta' endpoint... OK

Screenshots: Git Clone via CMD VSCODE Issue

I think the problem might be related to internet issues but then again cloning from another computer on the same network works as expected.

Things i've tried:

  • Resetting my password - Unsuccesfull
  • Removing the GIT Credentials in Windows Credential Manager - This allows me to re-enter my password (which is the same as the one used to log into the azure devops) and to SUCCESFULLY CLONE / PUSH only once, afterwards it fails again.
  • Re-install GIT and don't install GIT Credential manager
  • Just spamming the 'push' and 'sync changes' buttong in vscode makes it work 1 out of 30 times miraculously.
  • Sometimes if i remove my GIT credentials on my local device, i am prompted to add a password again (VSCODE & GIT both prompt me), after providing my password and my 2-Factor Authenticator , i get a 'unable to access' issue and a fatal error.
  • Flushing DNS
  • Cloning from another computer (WORKS FINE) ** Please note that for 1,5 weeks, there was no issue in pushing and cloning repo's with my clients email address they provided me with, also surfing to the browser and editing code on devops itself (still) works fine. all of a sudden one day after arriving at home, this error occured.**
Quartering answered 15/3, 2023 at 17:47 Comment(9)
Can this answer help?Nena
Are you using an antivirus or firewall other than the default? Are you using a proxy or TLS MITM device? If so, does completely uninstalling the software and restarting fix it, or does completely disabling the proxy or using a network without the TLS MITM device fix it?Inness
Hi, this is from my home network and i'm not using any proxy etc .. I do however am able to succesfully clone / push code when working on site at the client. So it's related to my home network.Quartering
I don't have an answer for you but I did just setup a new computer and am experiencing the exact same issue while trying to clone a repo from dev.azure.com/myorg. Maybe this could be related to a recent version of git ?Vanhomrigh
Did you found a solution? I don´'t want to try to install windows from scratch since @JamesHyot says he have the same problem in a new computer.Luciferous
My issue was "resolved" by connecting my laptop with an RJ45 cable and ditching WiFi... I first thought that it was caused by poor reception on office network but the issue continued using WiFi on my home network, sitting right next to the router. The issue went away once I started using my RJ45-USB adapterVanhomrigh
Would disabling IPV6 help, as mentioned in (your?) issue?Homothallic
FWIW I had this issue on a brand new Dell XPS system with Windows 11 pro on both wireless and wired connections. I also verified a simple 'curl example.com' failed about 30% of the time. with 'curl: (35) Recv failure: Connection was reset' and I was often seeing ERR_CONNECTION_RESET in a browser. For me Dell had preinstalled some sort of helper app for the 'Killer' network card and as soon as I opened this and turned off "Killer Prioritisation Engine" the problem went away. So if you have anything like this might be worth a try.Jetta
"Just spamming the 'push' and 'sync changes' button in vscode makes it work 1 out of 30 times miraculously." - this was one way I could get it to work . However Turning off the "Killer Prioritisation Engine" works betterThink
T
13

Answered in the comment from @chrisb; I've added here to make it more obvious:

FWIW I had this issue on a brand new Dell XPS system with Windows 11 pro on both wireless and wired connections. I also verified a simple 'curl example.com' failed about 30% of the time. with 'curl: (35) Recv failure: Connection was reset' and I was often seeing ERR_CONNECTION_RESET in a browser. For me Dell had preinstalled some sort of helper app for the 'Killer' network card and as soon as I opened this and turned off "Killer Prioritisation Engine" the problem went away. So if you have anything like this might be worth a try.

Killer Control Center: Settings Turn off Prioritization Engine

Think answered 11/2 at 22:35 Comment(0)
C
7

I had this problem and the solution was to turn off IPv6 in my Internet adapter settings

Wifi Adapter Settings

Solution from https://elguerre.com/2023/06/12/unable-to-access-dev-azure-com-git-repo-via-https-recv-failure-connection-was-reset/

Chu answered 15/1 at 10:38 Comment(2)
This was my issue when on wi-fi. Wasn't and issue with ethernet cable connect. Thanks!Basement
Thank you so much, I love stackoverflow and the shared knowledge about random problems.Luciferous
H
1

The one work I do not see in your question or issue is token.

HTTPS URL to Azure (or GitHub) are supposed to use as password a PAT (Personal Access Token)

For Azure access: "Use personal access tokens".

Assuming C:\Program Files\Git\usr\bin and C:\Program Files\Git\mingw64\bin are in your %PATH%:

  • check your credential helper: it should be "manager" (or manager-core):

    git config --global credential.helper
    
  • Check if you have any credentials already cached (from a simple CMD):

    printf "host= dev.azure.com\nprotocol=https\nusername=YOU" | git credential-manager get
    

    Replace "YOU" by your Azure login account name

  • if what you see is empty or is not your token, register it:

    printf "host= dev.azure.com\nprotocol=https\nusername=YOU" | git credential-manager store YOUR_TOKEN
    

Then try again your HTTPS access (push/pull/fetch)


Note: this is followed with git-ecosystem/git-credential-manager issue 1150, which includes:

For anyone who want to get rid from this annoying issue, need to disable IPv6.

Homothallic answered 17/3, 2023 at 8:36 Comment(0)
L
1

I had the exact same problem. At some point it stopped working completely.

So I ended up cloning my repo with SSH. To do this select you need to configure your SSH key. In the Clone Repository Select SSH and then Manage SSH Keys.

Clone using SSH

Check this link to get some help at creating your SSH key.

https://learn.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate?view=azure-devops

It says that you use ssh-keygen to generate your key. I can run that command in the command prompt. I don´t know if everyone can, or I just installed something previously. Anyway, you can generate that key with other tools, like PuttyGen.

When you finish, just clone your repo with the [email protected]:v3/organization/project/repo that you can copy from the Clone Repository screen.

Notes:

  • Before changing to ssh, my workaround was to connect to a VPN (work vpn or kaspersky vpn). This worked for some months.
  • Upgrading to Windows 11 didn't work, no need to try.
  • I haven't installed a fresh copy of windows. So I don't know if this will work.

(Edited)

  • I uninstalled my antivirus, and disabled windows firewall. Still not working. But the VPN workaround worked again, even after reinstalling it. Still using ssh.
Luciferous answered 18/3, 2023 at 6:53 Comment(0)
H
1

It could just be a matter of the network connectivity of your internet provider.

For example, I had a similar error when I connected my laptop via a hotspot connection established on my mobile phone. The problem disappeared when I switched the data transfer on my phone to another cellular operator.

Honea answered 31/1 at 0:56 Comment(0)
O
0

my issue is with IP6. i disabled IPV6 on my router and i can clone without any issue

Opt answered 2/10 at 13:58 Comment(0)
S
-1

I tried doing git push a couple of times on my home wifi, it didn't work. Then I tried using my phone's hotspot and after 3-4 attempts it worked. Although, I recommend using SSH

Saidee answered 10/6 at 6:48 Comment(1)
This is basically a duplicate of that answer about internet provider and the answer about using SSH.Dday

© 2022 - 2024 — McMap. All rights reserved.