- fatal: could not read Username for ‘https://github.com‘: Invalid argument
解决方法一
检查是否进行的Git设置
git config --global user.name "YOUR NAME"
git config --global user.email "YOUR EMAIL ADDRESS"
方法二
确保用户名正确的情况还是报错,就把HTTPS改为SSH方式连接,例如:
git remote set-url origin "YOUR SSH CONNECT ADDRESS"
- fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
解决方法
因为使用 SSH 连接,安全问题,要把Github添加到信任列表里。
ssh -T git@github.com
返回这个信息就表示成功了
Hi username! You've successfully authenticated, but GitHub does not
# provide shell access.
附上github文档
本文介绍了当遇到Git无法读取GitHub用户名错误时的两种解决方案。首先检查并设置Git全局配置,包括用户名和邮箱。如果问题仍未解决,可以尝试将HTTPS连接更改为SSH,并通过SSH密钥添加GitHub到信任列表。

1万+

被折叠的 条评论
为什么被折叠?



