当前位置:   article > 正文

今天学习git遇到的错误_this key is not known by any other names. are you

this key is not known by any other names. are you sure you want to continue


cat@cat MINGW64 ~
$ cd d:

cat@cat MINGW64 /d
$ cd learngit/

cat@cat MINGW64 /d/learngit (main)
$ git remote add origin git@github.com:Doraemon12138/learngit.git  //本地仓库和github进行关联

cat@cat MINGW64 /d/learngit (main)
$ git push -u origin master    //本地库的所有内容推送到远程库上,但这里应该是main,因为git更新了,现在github的默认分支为main
error: src refspec master does not match any
error: failed to push some refs to 'github.com:Doraemon12138/learngit.git'


 

cat@cat MINGW64 /d/learngit (main)
$ git pull // 还要先进行git pull!!!,第一次会出现以下内容

The authenticity of host 'github.com (20.205.243.166)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> main

cat@cat MINGW64 /d/learngit (main)
$ git push -u origin main   //推送成功以后就是这样的
Enumerating objects: 12, done.
Counting objects: 100% (12/12), done.
Delta compression using up to 8 threads
Compressing objects: 100% (9/9), done.
Writing objects: 100% (12/12), 2.55 KiB | 2.55 MiB/s, done.
Total 12 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), done.
To github.com:Doraemon12138/learngit.git
 * [new branch]      main -> main
branch 'main' set up to track 'origin/main'.


 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/651472
推荐阅读
相关标签
  

闽ICP备14008679号