For about a year, I've had a problem where git push
and git pull
from dev.azure.com
would intermittently fail with an error like this:
~#@❯ git pull ❮
fatal: unable to access 'https://dev.azure.com/dsschnau/_git/codecodecode/': OpenSSL SSL_connect: Connection was reset in connection to dev.azure.com:443
And then I'd have to re-try, sometimes about a dozen times.
~#@❯ git pull ❮
fatal: unable to access 'https://dev.azure.com/dsschnau/_git/codecodecode/': OpenSSL SSL_connect: Connection was reset in connection to dev.azure.com:443
~#@❯ git pull ❮
fatal: unable to access 'https://dev.azure.com/dsschnau/_git/codecodecode/': OpenSSL SSL_connect: Connection was reset in connection to dev.azure.com:443
~#@❯ git pull ❮
fatal: unable to access 'https://dev.azure.com/dsschnau/_git/codecodecode/': OpenSSL SSL_connect: Connection was reset in connection to dev.azure.com:443
~#@❯ git pull ❮
fatal: unable to access 'https://dev.azure.com/dsschnau/_git/codecodecode/': OpenSSL SSL_connect: Connection was reset in connection to dev.azure.com:443
~#@❯ git pull ❮
fatal: unable to access 'https://dev.azure.com/dsschnau/_git/codecodecode/': OpenSSL SSL_connect: Connection was reset in connection to dev.azure.com:443
~#@❯ git pull ❮
fatal: unable to access 'https://dev.azure.com/dsschnau/_git/codecodecode/': OpenSSL SSL_connect: Connection was reset in connection to dev.azure.com:443
~#@❯ git pull ❮
fatal: unable to access 'https://dev.azure.com/dsschnau/_git/codecodecode/': OpenSSL SSL_connect: Connection was reset in connection to dev.azure.com:443
~#@❯ git pull ❮
fatal: unable to access 'https://dev.azure.com/dsschnau/_git/codecodecode/': OpenSSL SSL_connect: Connection was reset in connection to dev.azure.com:443
But eventually it would work.
~#@❯ git pull ❮ 1
Already up to date.
I searched the web and found a StackOverflow question that suggested a workaround: add a HOSTS file entry to force dev.azure.com
to use an ipv4 address. That suggests the intermittent error has to do with ipv6.
I added this entry, and now my console pushes and pulls without SSL failures.
echo "13.107.42.20 dev.azure.com" > C:/Windows/System32/drivers/etc/HOSTS