visual studio 推送项目上自己的github账户报错

https://blog.csdn.net/weixin_43129574/article/details/104753639?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2~all~sobaiduend~default-3-104753639.nonecase&utm_term=vs2019%E6%8E%A8%E9%80%81github&spm=1000.2123.3001.4430

 

1、报错信息: could not read Username for ‘https://github.com’: terminal prompts disabled
在这里插入图片描述解决方法:
打开项目所在的目录下.git文件夹,打开config文件。(注:git文件夹默认隐藏)
修改[remote “origin”]下的
url = https://github.com/hddevteam/ServerMonitor-for-UWP.git

url = https://自己的用户名:自己的密码@github.com/hddevteam/ServerMonitor-for-UWP.git
只需加用户名和密码 不用改其他的

注:此方法只适用于在vs上推送到自己的账户上 如果推送到别人的账户是推不上去的
解决方法引用自:https://blog.csdn.net/dw33xn/article/details/79951714?utm_source=blogxgwz9

 

最终大boos    https://blog.csdn.net/dw33xn/article/details/79951714

vs2017 向github上push提交时 could not read Username for

错误

Git failed with a fatal error.
HttpRequestException encountered.
��������ʱ�����
cannot spawn askpass: No such file or directory
could not read Username for ‘https://github.com‘: terminal prompts disabled
Pushing to https://github.com/hddevteam/ServerMonitor-for-UWP.git

解决

    1. 打开项目所在的目录下.git文件夹,打开config文件。
    2. 修改[remote “origin”]下的
      url = https://github.com/hddevteam/ServerMonitor-for-UWP.git

      url = https://自己的用户名:自己的密码@github.com/hddevteam/ServerMonitor-for-UWP.git
      这里的“hddevteam”网上可能有不同的说法,这个是我们的团队名,个人开发的话是自己的用户名,一般不需要改。
       

 

 

https://blog.csdn.net/qq_41059339/article/details/104802367?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2~all~sobaiduend~default-2-104802367.nonecase&utm_term=vs2019%E6%8E%A8%E9%80%81github&spm=1000.2123.3001.4430

 

通过修改.git/config文件修改[remote origin]下url为https://uesr.name:user.secret@github.com/******
user.name 为用户名
user.secret 为用户密码

 

 

You recently used a password to access the repository at hddevteam/ServerMonitor-for-UWP with git using git/2.29.2 (Microsoft Windows NT 10.0.18363.0; Win32NT x64) CLR/4.0.30319 VS16/16.0.0.

Basic authentication using a password to Git is deprecated and will soon no longer work. Visit

 

以不支持该操作了,

posted @   LuoCore  阅读(239)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现
历史上的今天:
2018-11-21 JS获取节点的兄弟,父级,子级元素
2017-11-21 jquery 怎么判断当前按钮是否是disabled 属性
点击右上角即可分享
微信分享提示