git常见的一些错误:fatal: Could not read from remote repository. fatal: Not a git repository (or any of the
2018-10-31 14:46
471 查看
错误一:fatal: Not a git repository (or any of the parent directories): .git
此错误是因为你当前所在的文件夹还没有git成本地仓库,确保你是在作为本地仓库的文件夹下,然后使用:git init
错误二:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
此错误是你还关联远程仓库时使用的地址不正确,如果你是关联你的远程仓库可以使用Https,但如果你关联的远程仓库只能使用ssh地址,那你要在远程仓库添加你的ssh密钥。如果你没有ssh key,那就先创建
1.创建SSH Key
在终端输入(输入完成后回车几下):ssh-keygen -t rsa -C "GitHub的邮箱地址"
2.切换到~/.ssh目录下
cd 路径(上面命令的输出的内容有完整的路径,我的是/home/lihongcheng/.ssh)
用ls命令可以查看此目录下的文件有id_rsa(私钥)和id_rsa.pub(公钥)
3.显示公钥
cat id_rsa.pub
然后把显示出的私钥粘贴放到一个文件(此步可以不做)
阅读更多
相关文章推荐
- 【github常见操作和常见错误】错误提示:Permission denied (publickey). fatal: Could not read from remote repository.
- github常见操作和常见错误! fatal: Could not read from remote repository.
- git错误:fatal: Not a git repository (or any of the parent directories): .git
- git pull 出错 fatal: Could not read from remote repository.Please make sure you have the correct acces
- git pull 出错 fatal: Could not read from remote repository.Please make sure you have the correct access rights.and the repository exists.
- Git错误提示:fatal: Not a git repository (or any of the parent directories): .git
- git错误:fatal: Not a git repository (or any of the parent directories): .git
- git错误:fatal: Not a git repository (or any of the parent directories): .git
- git提交出现”Could not read from remote repository.Please make sure you have the correct access rights”错误
- git错误:fatal: Not a git repository (or any of the parent directories): .git
- git错误:fatal: Not a git repository (or any of the parent directories): .git
- Git错误提示之:fatal: Not a git repository (or any of the parent directories): .git
- git错误:fatal: Not a git repository (or any of the parent directories): .git
- git错误:fatal: Not a git repository (or any of the parent directories): .git
- git错误:fatal: Not a git repository (or any of the parent directories): .git
- Git错误提示之:fatal: Not a git repository (or any of the parent directories): .git
- 【Git初探】Git中fatal: Not a git repository (or any of the parent directories): .git错误的解决办法
- Git错误提示之:fatal: Not a git repository (or any of the parent directories): .git
- 解决git Could not read from remote repository.Please make sure you have the correct access rights
- Pixhawk---fatal: Not a git repository (or any of the parent directories)