用 git 往 github上传代码时,提示输入用户名和密码:

$ git config --list 查看自己所有的配置,包括user.name 等;

$ git push -u origin master
Username for 'https://github.com': 此处输入list查看的用户名

在密码框输入密码,连接失败;

最终发现,这个用户名和密码是你关联远程仓库的那个人的用户名和密码

git remote add origin https://github.com/Applewan/tictactoe.git(这个远程的账户)
再次push:

$ git push -u origin master
Username for 'https://github.com': Applewan

在密码框输入密码,上传成功;

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐