2013-02-12 53 views
4

Updatedx3(见下文) 所以我成功地用我的Git回购到位桶数月,直到 12年11月29日。直到那天(01/24/13)到 无效,我没有尝试再次提交。我在Cygwin中重新安装了我的ssh服务器,所以我确信我有一个合适的 连接。我能够从另一个工作站访问我的服务器,所以我 确定没关系。我还能够使用ssh隧道从 Bitbucket中克隆我的回购没有问题。然而,当我试图把我的变化 (添加,提交,等后)我得到以下几点:到位桶:混帐在Cygwin - 不能推到远程仓库

$ git push origin master  
Enter passphrase for key '/home/[User]/.ssh/id_rsa':  
conq: invalid command syntax.  
fatal: The remote end hung up unexpectedly 

我已经搜查了论坛,常见问题解答等,都无济于事。这里是输出 我的SSH:

$ ssh -T [email protected] 
Enter passphrase for key '/home/[User]/.ssh/id_rsa': 
conq: logged in as [username]. 

还可以使用Git或HG连接到位桶。外壳访问被禁用。

而且还为SSH -v:

$ ssh -v 
OpenSSH_5.8p1, OpenSSL 0.9.8r 8 Feb 2011 
usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] 
[-D [bind_address:]port] [-e escape_char] [-F configfile] 
[-I pkcs11] [-i identity_file] 
[-L [bind_address:]port:host:hostport] 
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] 
[-R [bind_address:]port:host:hostport] [-S ctl_path] 
[-W host:port] [-w local_tun[:remote_tun]] 
[[email protected]]hostname [command] 

和git --version:

$ git --version 
git version 1.7.5.1 

正如我所说的,SSH似乎是工作,这看起来是别的东西。

--Update-- 这里是-v -T [email protected]

$ ssh -v -T [email protected] 
OpenSSH_5.8p1, OpenSSL 0.9.8r 8 Feb 2011 
debug1: Reading configuration data /etc/ssh_config 
debug1: Connecting to bitbucket.org [207.223.240.181] port 22. 
debug1: Connection established. 
debug1: identity file /home/[User]/.ssh/id_rsa type 1 
debug1: identity file /home/[User]/.ssh/id_rsa-cert type -1 
debug1: identity file /home/[User]/.ssh/id_dsa type -1 
debug1: identity file /home/[User]/.ssh/id_dsa-cert type -1 
debug1: identity file /home/[User]/.ssh/id_ecdsa type -1 
debug1: identity file /home/[User]/.ssh/id_ecdsa-cert type -1 
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3 
debug1: match: OpenSSH_5.3 pat OpenSSH* 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_5.8 
debug1: SSH2_MSG_KEXINIT sent 
debug1: SSH2_MSG_KEXINIT received 
debug1: kex: server->client aes128-ctr hmac-md5 none 
debug1: kex: client->server aes128-ctr hmac-md5 none 
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent 
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP 
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent 
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY 
debug1: Server host key: RSA 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40 
debug1: Host 'bitbucket.org' is known and matches the RSA host key. 
debug1: Found key in /home/[User]/.ssh/known_hosts:1 
debug1: ssh_rsa_verify: signature correct 
debug1: SSH2_MSG_NEWKEYS sent 
debug1: expecting SSH2_MSG_NEWKEYS 
debug1: SSH2_MSG_NEWKEYS received 
debug1: Roaming not allowed by server 
debug1: SSH2_MSG_SERVICE_REQUEST sent 
debug1: SSH2_MSG_SERVICE_ACCEPT received 
debug1: Authentications that can continue: publickey 
debug1: Next authentication method: publickey 
debug1: Offering RSA public key: /home/[User]/.ssh/id_rsa 
debug1: Remote: Forced command: conq username:[username] 
debug1: Remote: Port forwarding disabled. 
debug1: Remote: X11 forwarding disabled. 
debug1: Remote: Agent forwarding disabled. 
debug1: Remote: Pty allocation disabled. 
debug1: Server accepts key: pkalg ssh-rsa blen 279 
debug1: key_parse_private_pem: PEM_read_PrivateKey failed 
debug1: read PEM private key done: type <unknown> 
Enter passphrase for key '/home/[User]/.ssh/id_rsa': 
debug1: read PEM private key done: type RSA 
debug1: Remote: Forced command: conq username:[username] 
debug1: Remote: Port forwarding disabled. 
debug1: Remote: X11 forwarding disabled. 
debug1: Remote: Agent forwarding disabled. 
debug1: Remote: Pty allocation disabled. 
debug1: Authentication succeeded (publickey). 
Authenticated to bitbucket.org ([207.223.240.181]:22). 
debug1: channel 0: new [client-session] 
debug1: Requesting [email protected] 
debug1: Entering interactive session. 
conq: logged in as [username]. 

You can use git or hg to connect to Bitbucket. Shell access is disabled. 
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0 
debug1: channel 0: free: client-session, nchannels 1 
Transferred: sent 2576, received 2984 bytes, in 0.3 seconds 
Bytes per second: sent 7759.0, received 8988.0 
debug1: Exit status 0 

更新(13年2月17日)的输出SSH:我通过支持页面上搜索Bitbucket的网站,但他们只详细说明如何在Windows上使用GitBash设置Bitbucket,而不是Cygwin。我看到其他人在他们的FAQ中遇到了同样的问题,但被提到Atlassian的支持。

我开始直接与Atlassian支持讲话,那家伙告诉我检查Stack Overflow(Git with SSH on Windows)的帖子。发布的解决方案无效,所以支持代表然后指示我安装GitBash,以查看除Cygwin之外是否还有其他问题。我安装了GitBash并能够使它工作,并可以使用ssh或https再次推送和克隆。我告诉代表,他说尽可能帮助他,因为我的问题是用我自己的软件。所以我相信我已经将问题缩小到了Cygwin中的一些似乎与SSH无关的机制,但可能与git有关。

更新(02/18/13): 今天,我证实我也能够从Cygwin拉。所以现在,我只是在推动这个问题。我正在考虑将一个别名映射到Cygwin中的mysysgit,如Errors cloning git project using Cygwin, msysgit Bash shell works,但这可能比我现在需要更多时间尝试。仍在寻找一种解决方案来让Cygwin中的Git本地工作。

更新(02/20/13): 我现在有与GitBash推动完全相同的错误。在支持页面上看到这个垃圾:https://bitbucket.org/site/master/issue/4406/invalid-command-synthax

这似乎是一个反复出现的问题,他们的支持不会直接解决。从它的外观来看,自2012年6月以来一直在进行,没有公布的决议。如果有人读到这个,可以给我一些指导,我将不胜感激。目前,我已经使用HTTPS切换到GitBash。

+0

你上传该计算机到位桶的关键? – jimiyash 2013-02-12 01:14:12

+0

是的,密钥已上传。在新的一年之前它一切正常。所有密钥都已设置并正常工作。 – Sekkou527 2013-02-12 03:30:01

+0

因此我在mac os 10.8.3上使用git git 1.7.9.6版本(Apple Git-31.1),并得到相同的问题。 – Saurabh 2013-04-16 06:56:27

回答

1

https://bitbucket.org/site/master/issue/4218/conq-invalid-repository-syntax

“对于SSH问题,请参阅我们的问题排查指南。https://confluence.atlassian.com/display/BITBUCKET/Troubleshooting+SSH+Issues第一。如果你继续有问题,然后提高他们[email protected]http://answers.atlassian.com,其中支持或社区可以帮助地址您的配置有任何问题。“

+0

我已经开始使用Atlassian支持,但他们的帮手让我安装并设置了GitBash,但没有解决这个问题。因此,我在这里问这是我的最后一招。 – Sekkou527 2013-02-12 03:31:33

+0

此外,您引用的支持页面没有解决使用Cygwin,仅使用GitBash的问题。 – Sekkou527 2013-02-12 03:43:05

+0

还有其他的东西吗? – Sekkou527 2013-02-14 21:33:52

0

此问题已修复。这是由于一些客户拥有独特的接收包配置。虽然我不知道客户端决定设置此功能,但许多用户都受到影响,因为Bitbucket的系统并未设计为通过SSH处理非连字符git命令语法。 Bitbucket现在已经改变了这一点,以允许git-receive-pack和git receive-pack工作。

仅供参考,请检查您的全局配置,你可能会看到类似:

remote.origin.receivepack git receive-pack 

时,默认情况下,它没有确定,但有git-receive-pack

+0

注意,当然,如果这不能解决它,请在Bitbucket支持中告诉我们。 – Marcus 2013-05-08 18:57:13

3

请检查{project_folder}/.git/config文件。 如果有远程存储库URL ssh://。删除它并尝试推送操作。

git push -u origin --all 

有效的远程存储库URL

url = [email protected]:{username}/{project-name}.git 
相关问题