ruby-on-rails – 无法推送到github,ssh:无法解析主机名
发布时间:2020-12-16 20:31:28 所属栏目:百科 来源:网络整理
导读:我不能通过这个,多次重建存储库,使ssh密钥结束 --------------demo_app username$git remote add origin git@github.com:username/demo_app.gitfatal: remote origin already exists.$git push -u origin master---ssh: Could not resolve hostname git: nod
我不能通过这个,多次重建存储库,使ssh密钥结束
-------------- demo_app <username>$git remote add origin git@github.com:<username>/demo_app.git fatal: remote origin already exists. $git push -u origin master --- ssh: Could not resolve hostname git: nodename nor servname provided,or not known --- fatal: Could not read from remote repository. --- Please make sure you have the correct access rights --- and the repository exists. ---------- --------- Checked ssh keys --- $ssh -T git@github.com Hi <username>! You've successfully authenticated,but GitHub does not provide shell access. --- 仍然收到相同的消息. 解决方法
而不是添加一个新的远程,请尝试使用以下命令更改现有的远程:
git remote set-url origin git@github.com:<username>/demo_app.git 编辑:所以,这里是使它的工作,而不会丢失你的代码的命令. > rm -rf .git> git initgit remote add origin git@github.com:< username> /demo_app.git> git commit –allow-empty -m’首先提交’> git push origin master (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- rubygems – 强制完全匹配`gem list`
- nosql – redis:处理故障转移?
- ruby-on-rails – 使用NOT与Squeel
- 通过XSLT从XML中删除空标签
- 从Objective-C源到Swift的Command-Click打开MyProject-Swif
- Excel VBA实现复制单元格区域到另一个Sheet
- ruby-on-rails – Rails 3.2.x remote => true仍然重新加载
- swift – 如何将字符串数组转换为NSData,NSData转换为字符串
- objective-c – 在-viewWillLayoutSubviews中调用的方法不可
- Thinking in React Implemented by Reagent