git学习笔记(一)

报错-1

$ git push -u longlib master
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (6/6), 456 bytes | 228.00 KiB/s, done.
Total 6 (delta 0), reused 0 (delta 0), pack-reused 0
remote: error: GH007: Your push would publish a private email address.
remote: You can make your email public or disable this protection by visiting:
remote: http://github.com/settings/emails
To github.com:raoziqiang/github.git
! [remote rejected] master -> master (push declined due to email privacy restrictions)
error: failed to push some refs to 'github.com:raoziqiang/github.git'

answer:github上面的setting选项Email子项  将私有权限改为共有权限

 报错2

Warning: Permanently added the RSA host key for IP address '13.229.188.59' to the list of known hosts.
Hi raoziqiang! You've successfully authenticated, but GitHub does not provide shell access.

answer:电脑C盘Windows子项里面的hosts文件将报错的IP地址填上  注意不要忘了“#”

 补充:

千万不要使用Windows自带的记事本编辑任何文本文件。原因是Microsoft开发记事本的团队使用了一个非常弱智的行为来保存UTF-8编码的文件,他们自作聪明地在每个文件开头添加了0xefbbbf(十六进制)的字符,你会遇到很多不可思议的问题,比如,网页第一行可能会显示一个“?”,明明正确的程序一编译就报语法错误,等等,都是由记事本的弱智行为带来的。建议你下载Notepad++代替记事本,不但功能强大,而且免费!记得把Notepad++的默认编码设置为UTF-8 without BOM即可:

set-utf8-notepad++

posted @ 2020-07-19 23:30  锦花  阅读(88)  评论(0)    收藏  举报