Visual Studio 2017团队服务:可以登录github帐户,但不能推送更改

编程入门 行业动态 更新时间:2024-10-23 09:32:00
本文介绍了Visual Studio 2017团队服务:可以登录github帐户,但不能推送更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我一直在尝试通过Visual Studio 2017 Team Services在笔记本电脑上设置github.它使我首先登录,甚至让我将叉存储库克隆/分支到本地文件夹中.问题是,每次我尝试将其推回github时,都会出现此错误:

I've been trying to set up github on my laptop via Visual Studio 2017 Team Services. It lets me sign in at first, and even let's me clone/fork repositories into a local folder. The problem is that every time I try to push back to github it comes up with this error:

推送到远程存储库时遇到错误:Git失败并出现致命错误. 遇到HttpRequestException. 发送请求时发生错误. 无法产生askpass:没有这样的文件或目录 无法读取" github "的用户名:终端提示已禁用 推送到github/[用户名]/[存储库名称]

Error encountered while pushing to the remote repository: Git failed with a fatal error. HttpRequestException encountered. An error occurred while sending the request. cannot spawn askpass: No such file or directory could not read Username for 'github': terminal prompts disabled Pushing to github/[username]/[repository name]

推荐答案

这已为我修复.

导航到C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\并删除Git文件夹.

确保系统上没有安装Git版本,请转到控制面板">程序和功能"将其删除(根据我的经验,TortoiseGit不需要删除,只需安装本机git)

Make sure that there is no version of Git installed on your system, remove it by going to Control Panel > Program and Features (TortoiseGit does not need to be removed from my experience, just native git installations)

打开VS 2017安装程序,然后在安装选项中取消选中"Git For Windows".

Open up the VS 2017 installer and untick "Git For Windows" in installation options.

转到git网站并安装最新版的Git For Windows.

Head over to the git website and install the latest version of Git For Windows.

返回VS安装程序并再次勾选"Git for Windows",即使看起来像新版本,它也不会下载新版本.完成后,您的git应该可以使用VSTS和TF Explorer.

Go back into the VS installer and tick "Git for Windows" again, it will not download a new version even though it may look like it is. After that is done your git should be fine with VSTS and TF Explorer.

ref: developercommunity. visualstudio/content/problem/27220/failed-to-push-remote-repository.html

更多推荐

Visual Studio 2017团队服务:可以登录github帐户,但不能推送更改

本文发布于:2023-11-14 00:05:26,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1585664.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:帐户   团队   Studio   Visual   github

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!