4 Replies - 671 Views - Last Post: 07 March 2018 - 08:21 AM

#1 andrewsw   User is offline

  • head thrashing
  • member icon

Reputation: 6666
  • View blog
  • Posts: 27,292
  • Joined: 12-December 12

GitHub fail in Visual Studio

Posted 05 March 2018 - 07:30 AM

On 22nd February there was a change, concerning TLS, discussed here:

Unable to connect to GitHub due to TLS 1.2 only change

The date of this change fits in with my current failure to connect to GitHub via Visual Studio (I could always connect and pull/push prior to this date).

I installed the GitHub extension and updated to the latest version of Visual Studio 2017 - the recommended solution. This did not resolve. On attempting to push and sign-in (to GitHub) for a specific project I receive the following error in the Output Window:

Quote

Error encountered while pushing to the remote repository: Git failed with a fatal error.
TaskCanceledException encountered.
A task was canceled.
cannot spawn askpass: No such file or directory
could not read Username for 'https://github.com': terminal prompts disabled
Pushing to https://github.com/SomeSite/GDPR.git


I attempted the Registry entries described in the article above, rebooting the computer and running VS as admin. Same issue.

Someone in support suggested the firewall might be to blame and added GitHub to a do not inspect rule. Same issue.

Has anyone encountered and resolved this issue?

Is This A Good Question/Topic? 0
  • +

Replies To: GitHub fail in Visual Studio

#2 Radius Nightly   User is offline

  • D.I.C Regular

Reputation: 39
  • View blog
  • Posts: 305
  • Joined: 07-May 15

Re: GitHub fail in Visual Studio

Posted 05 March 2018 - 07:40 AM

IDK You can try disabling firewall in router (if its blocking), checking SSL, clearing cache and DNS (in case VS are trying to connect according to previous information it has, thats now wrong).

Maybe this have useful information:
How to restrict the use of certain cryptographic algorithms and protocols in Schannel.dll
disable-weak-ciphers-and-enable-TLS1.x.reg
enable-systemdefaulttlsversions.txt

This post has been edited by Radius Nightly: 05 March 2018 - 07:47 AM

Was This Post Helpful? 1
  • +
  • -

#3 baavgai   User is offline

  • Dreaming Coder
  • member icon


Reputation: 7359
  • View blog
  • Posts: 15,283
  • Joined: 16-October 07

Re: GitHub fail in Visual Studio

Posted 05 March 2018 - 09:27 AM

I always found VS GitHub support ( well git support ) cumbersome enough that I'd jump out the the command line for git stuff.



Quote

cannot spawn askpass: No such file or directory
could not read Username for 'https://github.com': terminal prompts disabled

This is interesting. It looks like a failure to authenticate is causing some console reponse which is hidden from you. I believe VS does hook into some external Git for Windows install.

See if you can get Git for Windows proper to work for you. Indeed, of you have a key pair already set up and the protocol is no longer supported, you'd expect some kind of challenge.

Hmm... you probably tried this, but if not: do a fresh clone from GitHub and see how far you get with that?
Was This Post Helpful? 1
  • +
  • -

#4 andrewsw   User is offline

  • head thrashing
  • member icon

Reputation: 6666
  • View blog
  • Posts: 27,292
  • Joined: 12-December 12

Re: GitHub fail in Visual Studio

Posted 05 March 2018 - 09:36 AM

Thanks both for your suggestions.

@baavgai It did occur to me to install the Windows Git client but the installation is blocked for me, unfortunately. I might ask for info about this from support, as it would be a solution if I can connect from a command line and push.
Was This Post Helpful? 0
  • +
  • -

#5 andrewsw   User is offline

  • head thrashing
  • member icon

Reputation: 6666
  • View blog
  • Posts: 27,292
  • Joined: 12-December 12

Re: GitHub fail in Visual Studio

Posted 07 March 2018 - 08:21 AM

I resolved this to my satisfaction by installing the Git for Windows client and pushing my changes from the command line (Bash). (App Support downloaded the exe for me.) I'm only here for a few days more, so only needed this resolution.

This solution may not be good for others, though, who, for some reason, might not want to use Git outside of VS.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1