问题描述
Updatedx3(见下文)
所以我成功地使用了我的Git Bitbucket回购月,直到
11/29/12。我没有尝试,并再次提交,直到另一天(01/24/13)到
无效。我重新安装我的ssh服务器在Cygwin所以我放心,我有一个适当的
连接。我可以从另一个工作站访问我的服务器,所以我是
一定是没问题。我也能够克隆我的repo没有问题从
Bitbucket使用ssh隧道。但是,当我试图推送我的更改
(添加,提交等)后,我得到以下:
$ git push origin master
输入密钥'/home/[User]/.ssh/id_rsa'的密码:
conq:无效的命令语法。
fatal:远程端意外挂起
我搜索过论坛,常见问题等无效。以下是
的输出结果:ssh:
$ ssh -T git@bitbucket.org
Enter密钥的口令/home/[User]/.ssh/id_rsa':
conq:以[username]登录。
您可以使用git或hg连接到Bitbucket。 Shell访问已禁用。
此外,对于ssh -v:
$ ssh -v
OpenSSH_5.8p1,OpenSSL 0.9.8r 2011年2月8日
用法: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]]
[user @] hostname [command]
和git --version:
$ git --version
git version 1.7 .5.1
正如我所说,ssh似乎工作,这看起来是别的。 p>
- Update--
以下是ssh -v -T的输出git@bitbucket.org
$ ssh -v -T git@bitbucket.org
OpenSSH_5.8p1,OpenSSL 0.9.8r 2011年2月8日
debug1:读取配置数据/ etc / ssh_config
debug1:正在连接到bitbucket.org [207.223.240.181]端口22.
debug1:建立连接。
debug1:identity文件/home/[User]/.ssh/id_rsa type 1
debug1:identity文件/home/[User]/.ssh/id_rsa-cert类型-1
debug1 :身份文件/home/[User]/.ssh/id_dsa类型-1
debug1:身份文件/home/[User]/.ssh/id_dsa-cert类型-1
debug1:身份文件/ home / [User] /。ssh / id_ecdsa type -1
debug1:身份文件/home/[User]/.ssh/id_ecdsa-cert类型-1
debug1:远程协议版本2.0,远程软件版本OpenSSH_5.3
debug1:match:OpenSSH_5.3 pat OpenSSH *
debug1:为协议2.0启用兼容模式
debug1:本地版本字符串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 debug1:期望SSH2_MSG_KEX_DH_GEX_GROUP
debug1:发送SSH2_MSG_KEX_DH_GEX_INIT
debug1:期望SSH2_MSG_KEX_DH_GEX_REPLY
debug1:服务器主机密钥:RSA 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40
debug1:Host'bitbucket.org' RSA主机密钥。
debug1:找到密钥in /home/[User]/.ssh/known_hosts:1
debug1:ssh_rsa_verify:签名正确
debug1:SSH2_MSG_NEWKEYS发送
debug1:期望SSH2_MSG_NEWKEYS
debug1:SSH2_MSG_NEWKEYS收到
debug1:服务器不允许漫游
debug1:发送SSH2_MSG_SERVICE_REQUEST
debug1:收到SSH2_MSG_SERVICE_ACCEPT
debug1:可以继续的身份验证:publickey
debug1 :下一个认证方法:publickey
debug1:提供RSA公钥:/home/[User]/.ssh/id_rsa
debug1:远程:强制命令:conq用户名:[username]
debug1 :远程:禁用端口转发。
debug1:远程:X11转发禁用。
debug1:Remote:代理转发已禁用。
debug1:Remote:禁用Pty分配。
debug1:服务器接受密钥:pkalg ssh-rsa blen 279
debug1:key_parse_private_pem:PEM_read_PrivateKey failed
debug1:read PEM private key done:type< unknown>
输入密钥'/home/[User]/.ssh/id_rsa'的密码:
debug1:读取PEM私钥done:类型RSA
debug1:远程:强制命令:conq用户名: [username]
debug1:Remote:禁用端口转发。
debug1:远程:X11转发禁用。
debug1:Remote:代理转发已禁用。
debug1:Remote:禁用Pty分配。
debug1:认证成功(publickey)。
经过bitbucket.org验证([207.223.240.181]:22)。
debug1:channel 0:new [client-session]
debug1:请求no-more-sessions@openssh.com
debug1:进入交互式会话。
conq:以[username]登录。
您可以使用git或hg连接到Bitbucket。 Shell访问被禁用。
debug1:client_input_channel_req:channel 0 rtype exit-status reply 0
debug1:client_input_channel_req:channel 0 rtype eow@openssh.com reply 0
debug1:channel 0:free:client-session,nchannels 1
转移:发送2576,接收2984字节,0.3秒
每秒字节数:发送7759.0,接收8988.0
debug1:退出状态0
更新(02/17/13):我通过Bitbucket网站的支持页面进行了搜索,在Windows上使用GitBash设置Bitbucket而不是Cygwin。我看到其他人在他们的常见问题上有同样的问题,但被提到Atlassian支持。
我开始直接与Atlassian支持说话,那家伙告诉我检查一个关于Stack Overflow的帖子()。发布的解决方案没有工作,所以支持代表然后指示我安装GitBash,看看除了Cygwin之外是否还有其他问题。我安装了GitBash,并能够得到它的工作,可以推送和再次使用ssh或https克隆。我告诉代表,他说这是尽可能他能帮助,因为我的问题是与我自己的软件。所以我相信我已经将问题缩小到Cygwin内的一些机制,似乎不是SSH相关的,但可能是与git。
更新02/18/13):
今天,我确认我也可以从Cygwin拉。所以现在,我只是有推的问题。我正在考虑只是映射一个别名到cygwin内的mysysgit如在,但这可能需要更多的时间,比我现在尝试。
更新(02/20/13):
我现在正在寻找解决方案有与使用GitBash推送完全相同的错误。请在支持页面上查看此垃圾:
这似乎是一个经常性的问题,他们的支持不会直接地址。从它的外观,这一直是从2012年6月,没有公布的决议。如果有人读这个,可以给我一些方向,我会非常感谢。现在,我已使用HTTPS切换到GitBash。
解决方案请检查
{project_folder} /。git / config
文件。
如果有远程存储库URLssh://
。删除它并尝试push操作。git push -u origin --all
有效的远程存储库url
url = git @ bitbucket.org:{username}/{project-name}.git
Updatedx3 (See below)So I was successfully using my Git Bitbucket repo for months up until11/29/12. I did not try and make another commit until the other day (01/24/13) tono avail. I reinstalled my ssh server in Cygwin so I assured I had a properconnection. I am able to access my server from another workstation, so I amcertain that is okay. I was also able to clone my repo with no issue fromBitbucket using an ssh tunnel. However, when I tried to push my changes(after adding, committing, etc.) I get the following:
$ git push origin master Enter passphrase for key '/home/[User]/.ssh/id_rsa': conq: invalid command syntax. fatal: The remote end hung up unexpectedly
I have searched the forums, FAQs, etc. to no avail. Here is the output formy ssh:
$ ssh -T git@bitbucket.org Enter passphrase for key '/home/[User]/.ssh/id_rsa': conq: logged in as [username].
You can use git or hg to connect to Bitbucket. Shell access is disabled.
And also, for 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]] [user@]hostname [command]
And git --version:
$ git --version git version 1.7.5.1
As I said, ssh seems to be working, this looks to be something else.
--Update--Here is the output for ssh -v -T git@bitbucket.org
$ ssh -v -T git@bitbucket.org 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 no-more-sessions@openssh.com 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 eow@openssh.com 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
Update (02/17/13): I searched through the support page on Bitbucket's site, but they only detail how to set up Bitbucket with GitBash on Windows and not Cygwin. I saw where others had had the same problem on their FAQ, but were referred to Atlassian support.
I started speaking directly with Atlassian support and the guy told me to check a post on Stack Overflow (Git with SSH on Windows). The solution posted did not work, so the support rep then instructed me to install GitBash to see if there was some other problem besides Cygwin. I installed GitBash and was able to get it working and could push and clone again using ssh or https. I told the rep and he said that was as far as he could help since my issue was with my own software. So I believe I have narrowed the problem to some mechanism within Cygwin that does not seem to be SSH related, but perhaps something to do with git.
Update (02/18/13):Today, I confirmed that I was also able to pull from Cygwin. So now, I just have the issue with push. I am considering just mapping an alias to mysysgit inside of Cygwin as in Errors cloning git project using Cygwin, msysgit Bash shell works , but that may take more time than I have to try right now. Still looking for a solution to get Git working natively in Cygwin.
Update (02/20/13):I now have the exact same error pushing with GitBash. See this garbage at the support page: https://bitbucket.org/site/master/issue/4406/invalid-command-synthax
It seems to be a recurring problem that their support will not directly address. From the looks of it, this has been going on since June of 2012 with no published resolution. If anyone reads this and can give me some direction, I would greatly appreciate it. For now, I have switched to GitBash using HTTPS.
解决方案Please check
{project_folder}/.git/config
file.If have remote repository URLssh://
. Remove it and try push operation.git push -u origin --all
valid remote repository url
url = git@bitbucket.org:{username}/{project-name}.git
这篇关于Bitbucket:Git on Cygwin - 无法推送到远程存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!