github-invalid-username-or-password

问题描述

git clone 一个项目的时候执行命令

1
git clone XXX

输入帐号名和密码(没有输错),报以下错误:

1
2
3
4
Username for 'https://github.com': xxxx
Password for 'https://xxxx@github.com':
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/xxxx/xxx.git/'
阅读更多

git操作失败小结

git process semms to be running in this repository

Git 提交的过程中突然显示 Another git process semms to be running in this repository, e.g. an editor opened by ‘git commit’. Please make sure all processes are terminated then try again. If it still fails, a git process remove the file manually to continue…
即是 git 被另外一个程序占用。

原因在于 Git 在使用过程中遭遇了奔溃,部分被上锁资源没有被释放导致的。

解决方案:进入项目文件夹下的 .git 文件中(显示隐藏文件夹或 rm .git/index.lock)删除 index.lock 文件即可。

阅读更多