相关疑难解决方法(0)

通过SSH配置Git以登录一次

我已经通过ssh克隆了我的git存储库.因此,每次我通过推或拉与原始主人沟通时,我都必须重新输入密码.如何配置git以便我不需要多次输入密码?

git ssh ssh-keys

188
推荐指数
7
解决办法
28万
查看次数

如何调试git/git-shell相关问题?

我如何获得有关git/git-shell的一些调试信息?

我有一个问题,user1可以克隆存储库没有问题,而user2只能克隆一个空的.我设定了GIT_TRACE=1,但没有任何有用的东西被告知.

最后,经过长时间的反复试验,结果证明这是文件的权限问题.适当的错误消息可能会使此问题短路.

git debugging trace

130
推荐指数
7
解决办法
9万
查看次数

如何在通道0上修复请求失败

当我想连接到我的服务器这样的时候

ssh -a username@my-server.de -p 22
Run Code Online (Sandbox Code Playgroud)

它给了我两个错误消息:

PTY allocation request failed on channel 0
shell request failed on channel 0
Run Code Online (Sandbox Code Playgroud)

当我使用参数时-T,第一个错误消息消失了.但是如何修复第二个呢?我无法连接.对于其他服务器,我可以毫无问题地连接.

我在MAC OS 10.9上参数-v显示了这个调试输出:

OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to xxx.your-server.de [188.40.3.15] port 22.
debug1: Connection established.
debug1: identity file /Users/xxx/.ssh/id_rsa type -1
debug1: identity file /Users/xxx/.ssh/id_rsa-cert type -1
debug1: identity file /Users/xxx/.ssh/id_dsa type -1
debug1: identity file /Users/xxx/.ssh/id_dsa-cert type …
Run Code Online (Sandbox Code Playgroud)

ssh terminal pty

67
推荐指数
8
解决办法
20万
查看次数

ssh_exchange_identification:连接由Git bash下的远程主机关闭

我在win7工作并使用sshd设置git服务器.我git --bare init myapp.git,正确克隆ssh://git@localhost/home/git/myapp.gitCywgin中.但是我需要再次使用Cygwin的配置git ,我想在Git Bash中使用 git clone .我跑步git clone ssh://git@localhost/home/git/myapp.git并获得以下信息

ssh_exchange_identification: Connection closed by remote host
Run Code Online (Sandbox Code Playgroud)

然后我ssh -vvv git@localhostGit Bash中运行并获得消息

debug2: ssh_connect: needpriv 0
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: Connection established.
debug1: identity file /c/Users/MoreFreeze/.ssh/identity type -1
debug3: Not a RSA1 key file /c/Users/MoreFreeze/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace 
// above it …
Run Code Online (Sandbox Code Playgroud)

git ssh

46
推荐指数
9
解决办法
15万
查看次数

git推送到远程存储库"无法从远程存储库读取"

我搜索了一会儿,但我无法找到解决问题的方法.

我有一个服务器,我可以通过ssh连接到用户名git和本地git存储库.
现在我想将本地存储库推送到服务器上新创建的存储库.

这是我做的:

  • 在中创建了一个git存储库 /home/git/test.git
  • 将存储库初始化为裸机
  • 在本地计算机上添加了远程存储库
    git remote add test ssh://git@serverIp:/home/git/test.git
  • 现在我执行了push命令:
    git push test master

我总是得到

fatal: could not read from remote repository

Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)

我正在使用本地Windows 7机器,并希望上传到Linux服务器.
我可以通过ssh与git用户登录.我也尝试以root相同的结果作为用户(使事情工作一次).
我永远不会被问到ssh password.

我真的不知道我做错了什么.
在你称之为副本之前,我搜索了很多这个问题,似乎没有人谈论同样的问题.

更新:

  • "哪个git"返回/ usr/bin/git
  • PATH echo包含/ usr/bin
  • id_rsa和id_rsa.pub文件都已设置并带有passphrase
  • ssh git @ serverIp git-receive-pack也能正常工作并返回/ usr/bin/git-receive-pack
  • ssh git @ serverIp ls /home/git/test.git有效
  • 所有相关目录都是chmod 755
  • git是存储库的所有者
  • auth.log文件在尝试的push命令中没有新条目
  • GIT_TRACE = 2 git …

git ssh repository git-remote

31
推荐指数
3
解决办法
9万
查看次数

错误:找不到存储库。致命:无法从远程存储库读取。请确保您拥有正确的访问权限并且存储库存在

昨天我创建了一个 ssh 密钥并克隆了一个用于工作的存储库。进行一些更改后,我尝试推送提交:

git push
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)

我已经阅读了这篇活跃的 SO 帖子。我的问题仍然存在。我不知道如何找出问题所在,因此将分享我认为相关的所有内容。

在我的笔记本电脑上,我有个人和工作存储库。我的工作工作位于嵌套在~/Documents/Projects/Zen/Projects/. 其他地方例如~/Documents/Projects/Personal/用于个人github。

我的 .gitconfig 看起来像这样:

[user]
    email = 12345+doug@users.noreply.github.com
    name = 12345doug

[includeIf "gitdir:/home/doug/Documents/Projects/Zen/"]
    path = ~/.git-zen
Run Code Online (Sandbox Code Playgroud)

/.git-zen 看起来像这样:

[user]
        email = doug@work.com
        name = doug-work
Run Code Online (Sandbox Code Playgroud)

目前我在一个仓库中:

pwd
/home/doug/Documents/Projects/Zen/Projects/analytics-psql-action
Run Code Online (Sandbox Code Playgroud)

一些提交准备好推送:

~/Documents/Projects/Zen/Projects/analytics-psql-action$ git status
On branch master
Your branch is ahead of 'origin/master' by …
Run Code Online (Sandbox Code Playgroud)

git ssh github

7
推荐指数
1
解决办法
3万
查看次数

标签 统计

git ×5

ssh ×5

debugging ×1

git-remote ×1

github ×1

pty ×1

repository ×1

ssh-keys ×1

terminal ×1

trace ×1