执行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. win上的某个端口是否开启

    1.添加Telnet服务 控制面板-->程序-->打开或关闭windows功能 2.配置Telnet为自动并开启服务 计算机-->服务和应用程序-->服务 3.telnet - ...

  2. Android开发学习笔记-SharedPreferences的用法

    SharedPreferences介绍:   做软件开发应该都知道,很多软件会有配置文件,里面存放这程序运行当中的各个属性值,由于其配置信息并不多,如果采用数据库来存放并不划算,因为数据库连接跟操作等 ...

  3. Java8比较器,如何对 List 排序

    首页 所有文章 资讯 Web 架构 基础技术 书籍 教程 Java小组 工具资源 Java 8新特性终极指南 2014/06/20 | 分类: 基础技术 | 3 条评论 | 标签: java8 分享到 ...

  4. 如何通过Node.js启动cesium

    设置一个Web服务器通过Node.js是很容易的,只需要3个步骤: (1)从安装Node.js网站,你可以使用默认安装设置. (2)打开命令行,然后进入Cesium的根目录,通过npm install ...

  5. Chrome扩展应用

    现在越来越多的用户将chrome浏览器设置为自己默认的浏览器,不仅是因为他的界面美,最重要的是他对html5和CSS3完美的支持,且调试工具非常好用,还有丰富的扩展库.如何安装自己的扩展呢? 点击自定 ...

  6. 一份比较全面的PHP开发编码规范.

    这些年来多从事Linux下PHP和C相关的开发,带过很多项目和团队,下面是根据经验整理的PHP编码规范,可以用作给大家的范例和参考,根据需要进行取舍和修改! (可能最新的一些php5的规范不够完整,今 ...

  7. Linux+Redis实战教程_day01_常用命令【重点】

    3.常用命令[重点] Linux命令中参数,一般都是无序的.特殊情况下除外 3.1.磁盘管理命令 ls命令:列出目录内容 参数: -a 查询所有文件和文件夹.包含隐藏的 -l 查询详细列表    ls ...

  8. 多线程 TCP 连接

    TCP的Java支持 协议相当于相互通信的程序间达成的一种约定,它规定了分组报文的结构.交换方式.包含的意义以及怎样对报文所包含的信息进行解析,TCP/IP协议族有IP协议.TCP协议和UDP协议.现 ...

  9. 接口请求json解析问题

    今天同事问请求公司内部接口返回的json无法用json_decode解析,然后我让他把请求结果写入文件,然后文件发给我试试. 在打开这个文件之后我发现第一句话是 这是很令人奇怪的,为什么会出现一个双引 ...

  10. php查找之二分查找

    二分查找,往往是针对有序的数组进行查找,我们假设一个序列是数组有序,然后给定一个数字,查出它应该在这个数组中的排序位置 百度百科中讲到 二分查找也称折半查找(Binary Search),它是一种效率 ...