执行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. Unity用代码实现Remove Missing Script

    [MenuItem("Edit/Cleanup Missing Scripts")] static void CleanupMissingScripts () { ; i < ...

  2. C#操作共享文件夹

    public class NetFileShare { public NetFileShare() { } public static bool connectState(string path) { ...

  3. 2014-07-08 hibernate tenancy

    http://en.wikipedia.org/wiki/Multitenancy http://www.infoq.com/news/2012/01/hibernate-4-released htt ...

  4. 史上最强大的python selenium webdriver的包装

    1.之前已经发过两次使用单浏览器了,但是这个最完美,此篇并没有使用任何单例模式的设计模式,用了实例属性结果缓存到类属性. 2.最简单的控制单浏览器是只实例化一次类,然后一直使用这个对象,但每个地方运行 ...

  5. 谈谈入门iOS的经验吧

    前言 近期忙完项目比較闲,想写一篇博客来分享一些自学iOS的心得体会,希望对迷茫的你有所帮助.博主非科班出身,一些计算机术语上的不专业欢迎大家指正. 我是学微电子的.大四的时候找了一家深圳的专业对口的 ...

  6. Mybatis -- 批量更新 -- updateBatch

    mysql数据库配置: 数据库连接必须配置:&allowMultiQueries=true并且‘&’ 用&替换 jdbc.url=jdbc:mysql://192.168.10 ...

  7. Jackson Gson Json.simple part 2

    这篇blog介绍 Jackson 的特点和使用方法 Jackson支持三种使用方法 流API(streaming api Incremental parsing/generation) JsonPar ...

  8. Waf-Bypass-Learning

    WAF Bypass 综合篇: WAF攻防研究之四个层次Bypass WAF Bypass WAF Cookbook - MayIKissYou My Waf Bypass Series Articl ...

  9. weblogic12C出现“java.lang.ArrayIndexOutOfBoundsException: 48188”

    最近将10G的一个项目转移到12C出现数组越界的问题: 解决办法:  jaxen-1.1.1.jarxom-1.0.jaricu4j-2.6.1.jar  把项目中这三个jar包删除后就可以正常部署了 ...

  10. codeforces水题100道 第二十四题 Codeforces Beta Round #85 (Div. 2 Only) A. Petya and Strings (strings)

    题目链接:http://www.codeforces.com/problemset/problem/112/A题意:忽略大小写,比较两个字符串字典序大小.C++代码: #include <cst ...