执行git push命令异常,如下:

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags --set-upstream origin refs/heads/master:refs/heads/master
Pushing to https://github.com/gongyuhonglou/PlaylistVaporServer_Swift.git
fatal: could not read Username for 'https://github.com': Device not configured
Completed with errors, see above

原因:

.git文件下     config文件中url/pushurl没有用户身份信息:

[core]
repositoryformatversion =
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = https://github.com/gongyuhonglou/PlaylistVaporServer_Swift.git
fetch = +refs/heads/*:refs/remotes/origin/*
pushurl = https://github.com/gongyuhonglou/PlaylistVaporServer_Swift.git
[branch "master"]
remote = origin
merge = refs/heads/master

解决:

在请求串中加入身份信息即可,格式为:

https://[userName]:[password]@github.com/[username]/project.git

修改后:

[remote "origin"]
url = http://gongyuhonglou:000000@github.com/gongyuhonglou/PlaylistVaporServer_Swift.git
fetch = +refs/heads/*:refs/remotes/origin/*

注:000000代表密码

如果还是不能解决的话,就在终端操作git push:(提示手动输入github账号和密码)

macdeMacBook-Pro:Vapor mac$ git push
Username for 'https://github.com': github账号
Password for 'https://wengrp@yeah.net@github.com': github密码
Counting objects: , done.
Delta compression using up to threads.
Compressing objects: % (/), done.

Git - could not read Username for 'https://github.com',push报错解决办法的更多相关文章

  1. linux centos7 “git clone https://github.com/XXXXX” 报错解决方法

    2021-08-04 1. 问题描述 在执行以下命令时出现错误"正克隆到 'XXXXX'... fatal: unable to access 'https://github.com/lag ...

  2. git操作是出现Username for 'https://github.com':的验证问题

    Username for 'https://github.com': 输入的是github上的邮箱账号, 而不是github中设置的username, 这是个巨坑!!!Password for 'ht ...

  3. Error fetching https://gems.ruby-china.org/: bad response Not Found 404 (https://gems.ruby-china.org/specs.4.8.gz) 报错解决办法

    执行换源操作 gem source -a https://gems.ruby-china.org/ 时报错: Error fetching https://gems.ruby-china.org/: ...

  4. python进阶(六) 虚拟环境git clone报错解决办法

    在虚拟环境目录,进行git clone xxxxx.git  项目,报如下图错误 解决办法:env GIT_SSL_NO_VERIFY=true git clone xxxx.git

  5. git操作笔记《二》:github更新缓慢问题的解决办法

    从GitHub上拉取代码速度十分之慢,百度了一下,说是github的某些域名的dns解析被污染了. 解决方法: 方案一:可以花钱购买VPN服务,但是这对于学生党来说是不划算的. vpn 方案二:绕过d ...

  6. git push时出现 Username for 'https://github.com': 仅仅限于github

    使用git push origin master是出现如下问题:Username for 'https://github.com': 解决办法: git remote set-url origin g ...

  7. Username for 'https://github.com': remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/GLSmile/pythontest.git/' 问题

    使用$ git push -u origin master 进行同步时,提示输入用户名和密码,但是我输入正确的信息后,仍然 会报Username for 'https://github.com': r ...

  8. Visual Studio 默认git拉取Github出错 No error could not read Username for 'https://github.com': terminal prompts disabled

    发布到远程存储库时遇到错误: Git failed with a fatal error.fatal: HttpRequestException encountered.   ��������ʱ��� ...

  9. fatal: could not read Username for 'https://github.com': No such file or directo

    Git push origin master报错 fatal: could not read Username for 'https://github.com': No such file or di ...

随机推荐

  1. 安装unity3d多个版本共存

    转自:https://www.cnblogs.com/xsgame/p/3549486.html 用4.3打开两个低版本的unity工程,都报错.... 用低版本打开正常,希望Unity3D版本兼容性 ...

  2. phoenix连接hbase数据库,创建二级索引报错:Error: org.apache.phoenix.exception.PhoenixIOException: Failed after attempts=36, exceptions: Tue Mar 06 10:32:02 CST 2018, null, java.net.SocketTimeoutException: callTimeou

    v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VM ...

  3. Oracle创建directory

    Oracle创建directory   一般创建directory都是为了用数据泵导入/导出数据用,其实directory还有很多别的用处,本文不做阐述   1.新建directory的语法 CREA ...

  4. Python 和C#的交互

    IronPython是一个.NET平台上的Python实现,包括了完整的编译器.执行引擎与运行时支持,能够与.NET已有的库无缝整合到一起. IronPython已经很好的集成到了.NET frame ...

  5. nginx 配置虚拟主机的三种方法

    nginx,一个server标签就是一个虚拟主机. 1.基于域名的虚拟主机,通过域名来区分虚拟主机——应用:外部网站 2.基于端口的虚拟主机,通过端口来区分虚拟主机——应用:公司内部网站,外部网站的管 ...

  6. Struts2_day01讲义_使用Struts2完成客户列表显示的功能

  7. [AX]AX2012 R2 EP员工自助服务中的产品不能显示图片的问题

    在员工自助服务EP站点中员工可以通过Order products自助提交采购申请,在正确设置员工采购目录后会罗列出允许员工购买的产品,每个产品都可带有图片,我们可以通过Product image来为产 ...

  8. 国内CDN加速现状

    什么是CDN CDN的全称是Content Delivery Network,即内容分发网络.是位于网络层与应用层之间的网络应用,其目的是通过在现有的Internet中增加一层新的网络架构,将网站的内 ...

  9. PC 商城扫描二维码登录

    需求分析: 扫码入口,在pc登录首页新增二维码登录入口 点击扫码入口显示二维码 二维码有效时间为一分钟 超时后显示二维码失效,点击刷新后生成新的二维码 在app端用户登录并扫码后,点击确认登录,进行跳 ...

  10. python --葵花宝典

    1.python 函数 定义 ---def() def  fun(): print(“我是小甲鱼!!”) 调用函数 a =fun() print (a) 即可  ,注:函数调用是由上而下: 2.pyt ...