分为两种方式上传:http和ssh
我先采用的ssh,遇到问题之后,改为用https方式
参考:https://blog.csdn.net/zeng092210/article/details/95622318
1.先在github上新建一个project
2.在pc上生成ssh key复制到github上。具体生成过程参考:
https://www.cnblogs.com/sxdcgaq8080/p/10570150.html
在git push -u origin master的时候报错:
ERROR: Repository not found. fatal: Could not read from remote repository. Please make sure you have the correct access rights
后改为https方式,参考:
https://blog.csdn.net/qq_41055045/article/details/99941324
输入密码时要输出token,参考:https://blog.csdn.net/weixin_41010198/article/details/119698015
:~/testgit$ git clone https://github.com/zlu1994/yolov5_pytorch.git Cloning into 'yolov5_pytorch'... Username for 'https://github.com': zlu1994 Password for 'https://zlu1994@github.com': remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information. fatal: Authentication failed for 'https://github.com/zlu1994/yolov5_pytorch.git/' :~/testgit$ git clone https://github.com/zlu1994/yolov5_pytorch.git Cloning into 'yolov5_pytorch'... Username for 'https://github.com': zlu1944 Password for 'https://zlu1944@github.com': remote: Enumerating objects: 3, done. remote: Counting objects: 100% (3/3), done. remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 Unpacking objects: 100% (3/3), done.



