美文网首页
2019-06-04 Github无法上传项目Permanent

2019-06-04 Github无法上传项目Permanent

作者: 兣甅 | 来源:发表于2019-06-04 17:14 被阅读0次

遇到的问题大致如下:

Push failed
Warning: Permanently added the RSA host key for IP address '13.250.177.223' to the list of known hosts.
                git@github.com: Permission denied (publickey).
                Could not read from remote repository.
                Please make sure you have the correct access rights
                and the repository exists.

明明其他github的项目都能提交代码和拉取代码,但是新项目死活上传不上去(没有用SSH的方式)

采用SSH的方式解决上传问题:

1.创建ssh相关文件
case@case-PC:~$ git config --global --list
...//验证邮箱
case@case-PC:~$ git config --global user.name case//设置全局用户名和邮箱
case@case-PC:~$ ssh-keygen -t rsa -C case@sina.com//生成秘钥,一路回车即可
...
case@case-PC:~$ cd /home/case/.ssh/
case@case-PC:~/.ssh$ ls
id_rsa  id_rsa.pub  known_hosts

2.找到id_rsa(最新github已经换成了id_rsa.pub)文件并打开,复制到github的setting->SSH and GPG keys ->SSH keys的New SSH key即可
3.上传到github
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/case/xxdemo.git
git push -u origin master
4.查看原文

相关文章

  • 2019-06-04 Github无法上传项目Permanent

    遇到的问题大致如下: 明明其他github的项目都能提交代码和拉取代码,但是新项目死活上传不上去(没有用SSH的方...

  • Android 制作远程依赖库

    首先要上传项目到GitHub上,参考Android:上传项目到GitHub[https://www.jianshu...

  • GitHub上传本地项目 之 Github设置SSH keys

    GitHub上传本地项目 之 Github本地项目上传 (2) 一、 准备 (1) 安装 git 在Xcode已经...

  • github上传项目

    1.在github上新建仓库,复制仓库地址 2.使用git工具定位到要上传的项目 3.输入"git init" 初...

  • github上传项目

    1.在命令行中,输入“git init”,使Test文件夹加入git管理;2.输入“git add .”(不要漏了...

  • github上传项目

    参考:https://www.jianshu.com/p/be9f0484af9d 1.注册GitHubGithu...

  • github上传项目

    今天闲来无事搞整一下github上传项目,中间还是有些波折,参考了一下几位网友的综合一下: CKTim——http...

  • GitHub 上传项目

    上传方式有2种: GitHub Desktop上传 终端上传 一、GitHub Desktop上传 下载GitHu...

  • GitHub上传项目

    使用GitHub是每个程序员必备的知识之一。如何使用好GitHub,Google下就有比较好的教程,接下来我所讲的...

  • GitHub上传项目

    主题:向git上传本地项目 step1: 在https://github.com/上注册一个账号 step2: (...

网友评论

      本文标题:2019-06-04 Github无法上传项目Permanent

      本文链接:https://www.haomeiwen.com/subject/npdrxctx.html