本文翻译自:git: fatal: Could not read from remote repository

I am trying to set git up with http://danielmiessler.com/study/git/#website to manage my site. 我正在尝试使用http://danielmiessler.com/study/git/#website设置git来管理我的网站。

I have gotten to the last step in the instructions: git push website +master:refs/heads/master 我已经到达指示的最后一步:git push website + master:refs / heads / master

I am working using the git ming32 command line in win7 我正在使用Win7中的git ming32命令行

$ git push website +master:refs/heads/master
Bill@***.com's password:
Connection closed by 198.91.80.3
fatal: Could not read from remote repository.Please make sure you have the correct access rights
and the repository exists.

One problem here may be that the program is looking for Bill@***.com. 这里的一个问题可能是该程序正在寻找Bill@***.com。 when I connect via ssh to my site I have a different username( lets say 'abc'). 当我通过ssh连接到我的网站时,我使用了另一个用户名(可以说'abc')。 so maybe this should be abc@***.com. 所以也许应该是abc@***.com。 If so I don't know how to change this or if I can push under an alias 如果是这样,我不知道该如何更改,或者我是否可以使用别名进行推送


#1楼

参考:https://stackoom.com/question/ugNp/git-致命的-无法从远程存储库读取


#2楼

You can specify the username that SSH should send to the remote system as part of your remote's URL. 您可以指定SSH应该作为远程URL的一部分发送到远程系统的用户名。 Put the username, followed by an @ , before the remote hostname. 在远程主机名前放置用户名,后跟@

git remote set-url website abc@***.com:path/to/repo

#3楼

In your .git/config file 在您的.git / config文件中

[remote "YOUR_APP_NAME"]url = git@heroku.com:YOUR_APP_NAME.gitfetch = +refs/heads/*:refs/remotes/YOUR_APP_NAME/*

And simply 并且简单地

git push YOUR_APP_NAME master:master

#4楼

After doing some research I've finally got solution for this, you have declared a environment variable to plink.exe path. 经过研究,我终于找到了解决方案,您已将环境变量声明为plink.exe路径。 So if you remove that path, reopen the git bash and try cloning through SSH it will work. 因此,如果删除该路径,请重新打开git bash并尝试通过SSH克隆将起作用。

Refer to this link 参考此链接

http://sourceforge.net/p/forge/site-support/2959/#204c http://sourceforge.net/p/forge/site-support/2959/#204c


#5楼

Make sure you have correct url in .git/config 确保.git/config网址正确

url = git@github.com:username/repo.git

If it's your first push, you'll need to set up correct upstream 如果这是您的第一个建议,则需要设置正确的上游

$ git push -u origin master

You can check which key is used by: 您可以通过以下方式检查使用哪个密钥:

$ ssh -vvv git@github.com

The reply should contain something like this: 答复应包含以下内容:

debug1: Next authentication method: publickey
debug1: Offering RSA public key: ~/.ssh/id_rsa
...
You've successfully authenticated, but GitHub does not provide shell access.

Also it's possible to define rules for ssh in ~/.ssh/config , eg based on aliases: 也可以在~/.ssh/config为ssh定义规则,例如基于别名:

   Host githubHostName github.com User gitIdentityFile "~/.ssh/id_rsa"Host gitHostName github.com User gitIdentityFile "~/.ssh/some_other_id"

You can set connect to different ports, use different username etc. for each alias. 您可以设置连接到不同的端口,为每个别名使用不同的用户名等。


#6楼

Try removing the GIT_SSH environment variable with unset GIT_SSH . 尝试使用未unset GIT_SSH删除GIT_SSH环境变量。 This was the cause of my problem. 这是我问题的原因。

git:致命的:无法从远程存储库读取相关推荐

  1. IDEA使用git出现SSH:无法解析主机名XXX:名称或服务未知无法从远程存储库读取错误

    IDEA使用git出现SSH:无法解析主机名XXX:名称或服务未知无法从远程存储库读取错误这个也是大家经常出现的一个错误,今天就分享一下如何进行配置 你在IDEA中进行pull或者push的时候会出现 ...

  2. linux git reposi,关于linux:GitLab:无法从远程存储库读取

    我创建了项目并添加了ssh-key(都通过webinterface),但是当我尝试向存储库中推送内容时,出现此错误:"无法从存储库读取". 这可能是由于以下事实:.git-proj ...

  3. 如何将现有的非空目录转换为Git工作目录并将文件推送到远程存储库

    我有一个非空目录(例如/ etc / something),其中包含无法重命名,移动或删除的文件. 我想将这个目录检查到git中. 我希望能够使用"git push"或类似的东西将 ...

  4. git git 查看远程库_如何从Git远程存储库中提取

    git git 查看远程库 Note: This the fourth video in the Git for beginners series. Watch the first video her ...

  5. 发布到远程存储库时遇到错误: 未能推送到远程存储库。请参见输出窗口了解更多详细信息。

    发布到远程存储库时遇到错误: 未能推送到远程存储库.请参见输出窗口了解更多详细信息. 使用Git进行代码托管到Gitee 小白学习笔记,记录一下,仅供参考 使用Git进行代码托管到Gitee是,出现错 ...

  6. 从Maven远程存储库下载

    示例 org.jvnet.localizer 只适用于 Java.net资源库 pom.xml <dependency><groupId>org.jvnet.localizer ...

  7. 【Git】从Git远程存储库中删除所有.pyc编译文件;附常用gitignore配置

    问题 提交的时候使用git add --all,然后把所有文件都推送到了远程仓库中. 现在我想在远程仓库中删除它们,例如*.pyc文件. 解决方式 git rm *.pyc --cached 删除的时 ...

  8. 尝试远程添加Git存储库时收到“致命错误:不是git存储库”

    我通过遵循本教程向自己介绍Git: 让jekyll在Nearlyfreespeech.net上运行 一切正常,直到将回购添加到本地计算机的部分为止: git remote add nfsn ssh:/ ...

  9. 如何更改远程Git存储库的URI(URL)?

    我在硬盘驱动器(本地)上克隆的USB密钥上有一个回购(来源). 我将"起源"移至NAS并成功测试了从此处克隆它的过程. 我想知道是否可以在"本地"设置中更改&q ...

最新文章

  1. linux 安装jdk yum安装 源码包安装
  2. 合肥天鹅湖万达广场机器人_王健林再考察合肥!瞄准政务、高新,年末合肥楼市出现区域分化...
  3. 为什么你闻不到自己胳肢窝的味道?
  4. linux df和du常用命令
  5. [转]Java Web基础——Action+Service +Dao三层的功能划分
  6. 2场直播丨PostgreSQL、openGauss
  7. python 简单文字游戏代码
  8. 金字塔原理——表达的逻辑
  9. react引入html2canvas和jspdf生成PDF打印及下载
  10. 技术分享杂七杂八技术
  11. 提升网站权重优化方法,网站权重优化步骤
  12. Oracle无法标识锁定数据文件,启动错误ORA-01157: 无法标识/锁定数据文件 解决方案...
  13. 5种最热门编程语言的优缺点
  14. 解决Ubuntu更新后无线网卡不能使用的问题
  15. css抄页面,如何正确的抄网页
  16. Html5工单系统,PESCMS Ticket(客服工单系统) V1.3.4 官方版
  17. 【MATLAB】MATLAB实现 之 OFDM(正交频分复用技术)
  18. 关于windows安装wsl,出现WslRegisterDistribution failed with error: 0x8007019e The Windows Subsystem错误的解决方案
  19. 大学中对我影响最大的十本书
  20. Java实现Zip包解压

热门文章

  1. 怎样解决VirtrualBox不能新建64bit的系统的问题
  2. 2、单机运行环境搭建之 --CentOS-6.5安装配置Tomcat8
  3. 委派控制-将计算机加入域
  4. centos6 安装和配置PHP 7.0
  5. 图论:有源汇有上下界最小流
  6. 【洛谷1962】 斐波那契数列
  7. TCP/IP详解 笔记十一
  8. cheatsheet 常用图标大全
  9. 与虚拟机连接出现ora-12514错误解决方法
  10. Microsoft Expression Studio 3中文版