把本地仓库的内容推送到GitHub仓库报错:Permission denied (publickey).
来源:互联网 发布:Java凸包算法 编辑:程序博客网 时间:2024/05/29 05:04
今天在练习git命令行操作时,出现上述报错。
具体过程:
我在本地创建了一个git仓库,又在github上创建了一个仓库,并且让两个仓库同步。
在上述准备工作做完后,根据github的提示,需要在本地的git仓库中运行命令:
git remote add origin git@github.com:******************
这条命令执行后没有问题,接下来执行
git push -u origin master
报错:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
接着又做如下尝试:sh-3.2# ssh -T git@github.com
Permission denied (publickey).
然后就在网上查询资料,看到如下一些信息:https://help.github.com/articles/error-permission-denied-publickey/
Error: Permission denied (publickey)
A "Permission denied" error means that the server rejected your connection. There could be several reasons why, and the most common examples are explained below.
Should the sudo
command be used with Git?
You should not be using the sudo
command with Git. If you have a very good reason you must use sudo
, then ensure you are using it with every command (it's probably just better to use su
to get a shell as root at that point). If you generate SSH keys without sudo
and then try to use a command like sudo git push
, you won't be using the same keys that you generated.
- 把本地仓库的内容推送到GitHub仓库报错:Permission denied (publickey).
- Git-最简单的本地项目变成版本仓库,然后把内容推送到GitHub仓库
- Git-最简单的本地项目变成版本仓库,然后把内容推送到GitHub仓库
- GitHub推送本地代码到仓库
- git将本地仓库推送到github
- Git 推送本地仓库到GitHub
- git 将本地仓库推送到github仓库
- git把本地仓库推送到新仓库
- 把本地项目上传到Github仓库
- 推送仓库到github
- Github: Permission denied (publickey)
- github Permission denied (publickey).
- GitHub: Permission denied (publickey)
- GitHub Permission denied(publickey)
- Permission denied (publickey)无权访问远程Git代码仓库
- 关于github的ssh, permission denied(publickey)
- github 出现 Permission denied (publickey)的解决
- github 出现 Permission denied (publickey)的解决
- ural 1149. Sinus Dances dfs
- 操作系统基础之设备管理
- 最新版idea2017+kemulator搭建J2ME开发环境
- R极简教程-8:缺失值与异常值
- STM32 大小端模式 与 堆栈及其增长方向分析
- 把本地仓库的内容推送到GitHub仓库报错:Permission denied (publickey).
- [bzoj4849]Mole Tunnels
- 文件系统
- 字符、字节
- 前台数据传向后台解决乱码问题
- Hive Transaction问题
- 操作系统基础之文件管理
- 拆分字符串
- Timestamp 类型的时间转换成字符串