引言

效果展示

过程

全局设置用户名

两种效果一样,命令比较简单。

命令

1
2
git config user.name "your-username"
git config user.email "your-email-address"

文件

~/.gitconfig

1
2
3
[user]
name = your-username
email = your-email-address

could not read Username for ‘https://github.com

fatal: could not read Username for 'https://github.com': No such device or address

结论

引用

  1. git - GitHub - fatal: could not read Username for ‘https://github.com': No such file or directory - Stack Overflow
  2. git config 的全局和本地配置 - 知乎