Github上传遇到 GitHub could not read Username 的解决办法

时间:2024-03-29 17:39:18

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

1     Push failed
2             Failed with error: unable to read askpass response from     'C:\Users\eddy\.WebStorm2017.1\system\tmp\intellij-git-askpass.bat'
3             failed to execute prompt script (exit code 1)
4             could not read Username for 'http://gitlab.qdum.com': No error    

原因

.git文件下     config文件中没有用户身份信息Github上传遇到 GitHub could not read Username 的解决办法

解决

在请求串中加入身份信息即可,格式为:注意:输入密码后 用“@”分隔

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

修改后

1 [remote "origin"]
2     url = http://wangshzh:[email protected]/zhangyb/dmavip.git
3     fetch = +refs/heads/*:refs/remotes/origin/*

注:1111111代表密码,此处为示例