PhpStrom & GitHub integration issues
I had some issues with PhpStorm, git & GitHub integration but finally I get it almost working. Before I start describing my problems I have to say that I'm newbie to git and possible all my problems caused by this. And also I would like to thank whole jetbrains company for their software it's A.W.E.S.O.M.E !!!
So first problem for me was that I was not able to find where is "Start Screen" located, I mean when you just installed PhpStorm and it display nice screen with suggested actions and info about installed plugins and etc. on first run.
Second was that I expect that "File" > "New Project from Existing Files..." will provide "wizard" for initialization project from GitHub, but it could not. It will be nice to add new point there like "I have no server, just let me checkout" (but really I have Zend Server).
The problem was that I tried checkout it "manually" using "Version Control" > "Checkout from Version Control" > "GitHub" (see related GitHub Popup.bmp screenshot) ant it just do nothing =\ only not-user-friendly error appears about that remote host closed connection or something like this.
Then I tried use my brain. First of all github requires SSH and it uses key instead of passwords for identification, right? So I tried to configure git in PhpStorm. So I go to "Settings" > ... > "Git" press test and got error message it mean that I need "install" external git client. I'm using Windows XP at work and Windows 7 (yep, I'm trying switch to Ubuntu but it doesn't provide all what I need, or I do not know enough...) Then I went to Google.com, type "git" and hit I'm feeling lucky and was redirected to http://git-scm.com/, there was Windows icon in "Download git" and it leads me to http://code.google.com/p/msysgit/downloads/list?can=3 there was "Full installer for official Git 1.7.4" and it looks like what I need. I downloaded it and install ("git-cheetah shell extension" & "Use Git Bash only" because I'm using cigwin for some SVN related work and other cases looks dangerous for me, and at previous PC I selected "Use OpenSSH" but now I'll try use Putty's plink.exe, lets see will it change anything) but still was not able to checkout anything from GitHub, so I had to create SSH keys and add them to PhpStorm and GitHub, so I googled this page http://help.github.com/msysgit-key-setup/, generate key and post it to GitHub account. (Well, on current PC I have Cyrillic username and git bash has problems with it, hey gays guys, English is not only language!!!)
Here is my Git Bash log, for everyone how also proudly uses russian usernames :
ERROR: HOME directory 'C:\Users?<?вцп-ня ?<їа-' doesn't exist! This is an error which might be related to msysGit issue 108. You might want to set the environment variable HOME explicitly. Falling back to / (C:/Program Files/Git). Welcome to Git (version 1.7.4-preview20110204) Run 'git help git' to display the help index. Run 'git help <command>' to display help for specific commands. ?<?вцп-ня ?<їа-@AMSTERDAM d:/ $ cd ~/.ssh sh: cd: //.ssh: No such file or directory ?<?вцп-ня ?<їа-@AMSTERDAM / $ ls -alFh total 846k drwxr-xr-x 11 ?<?вцп-н Админист 4.0k Feb 10 22:42 ./ drwxr-xr-x 11 ?<?вцп-н Админист 4.0k Feb 10 22:42 ../ -rw-r--r-- 1 ?<?вцп-н Админист 1.7k Feb 10 22:42 Git Bash.lnk -rw-r--r-- 1 ?<?вцп-н Админист 426 Feb 4 08:46 Git Bash.vbs -rw-r--r-- 1 ?<?вцп-н Админист 26k Feb 4 08:46 ReleaseNotes.rtf drwxr-xr-x 2 ?<?вцп-н Админист 40k Feb 10 22:42 bin/ drwxr-xr-x 2 ?<?вцп-н Админист 0 Feb 10 22:41 cmd/ drwxr-xr-x 3 ?<?вцп-н Админист 0 Feb 10 22:41 doc/ drwxr-xr-x 2 ?<?вцп-н Админист 4.0k Feb 10 22:42 etc/ drwxr-xr-x 2 ?<?вцп-н Админист 0 Feb 10 22:42 git-cheetah/ drwxr-xr-x 9 ?<?вцп-н Админист 4.0k Feb 10 22:42 lib/ drwxr-xr-x 4 ?<?вцп-н Админист 0 Feb 10 22:42 libexec/ -rw-r--r-- 1 ?<?вцп-н Админист 104 Feb 10 22:42 setup.ini drwxr-xr-x 9 ?<?вцп-н Админист 0 Feb 10 22:42 share/ drwxr-xr-x 4 ?<?вцп-н Админист 0 Feb 10 22:42 ssl/ -rw-r--r-- 1 ?<?вцп-н Админист 439k Feb 10 22:42 unins000.dat -rwxr-xr-x 1 ?<?вцп-н Админист 1.1M Feb 10 22:36 unins000.exe* ?<?вцп-ня ?<їа-@AMSTERDAM / $ ssh-keygen -t rsa -C "email@example.com" Generating public/private rsa key pair. Enter file in which to save the key (//.ssh/id_rsa): Could not create directory '//.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: open //.ssh/id_rsa failed: No such host or network path. Saving the key failed: //.ssh/id_rsa. ?<?вцп-ня ?<їа-@AMSTERDAM / $ pwd / ?<?вцп-ня ?<їа-@AMSTERDAM / $ cd ~ ?<?вцп-ня ?<їа-@AMSTERDAM / $ ls / Git Bash.lnk bin etc libexec ssl Git Bash.vbs cmd git-cheetah setup.ini unins000.dat ReleaseNotes.rtf doc lib share unins000.exe ?<?вцп-ня ?<їа-@AMSTERDAM / $ ssh-keygen -t rsa -C "mail@example.com" Generating public/private rsa key pair. Enter file in which to save the key (//.ssh/id_rsa): /.ssh/id_rsa Enter passphrase (empty for no passphrase): Enter same passphrase again: open /.ssh/id_rsa failed: No such file or directory. Saving the key failed: /.ssh/id_rsa. ?<?вцп-ня ?<їа-@AMSTERDAM / $ ssh-keygen -t rsa -C "alexander@ilyin.eu" Generating public/private rsa key pair. Enter file in which to save the key (//.ssh/id_rsa): id_rsa Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in id_rsa. Your public key has been saved in id_rsa.pub. The key fingerprint is: XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX example.com ?<?вцп-ня ?<їа-@AMSTERDAM / $ ssh --help usage: ssh [-1246AaCfgkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] [-e escape_char] [-F configfile] [-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 local_tun[:remote_tun]] [user@]hostname [command] ?<?вцп-ня ?<їа-@AMSTERDAM / $ ssh git@github.com -i id_rsa The authenticity of host 'github.com (207.97.227.239)' can't be established. RSA key fingerprint is XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts. Enter passphrase for key 'id_rsa': Hi username! You've successfully authenticated, but GitHub does not provide shell access. Connection to github.com closed. ?<?вцп-ня ?<їа-@AMSTERDAM / $
Well and I just noticed I forgot do this, and possible it was the problem of this https://github.com/alexanderilyin/zf2/commit/dd23c04fc1a9e781cdae251ee095f514bcbb7cda - I mean "unknown (author)" label, it really sucks =\
?<?вцп-ня ?<їа-@AMSTERDAM / $ git config --global user.name "username" ?<?вцп-ня ?<їа-@AMSTERDAM / $ git config --global user.email "mail@example.com"
After this I was able to check out project from GitHub in PhpStorm (but it was problem only with my own (forked) repositories, "watched" repos I was able to checkout without all those actions). But it's not working now when my SSH keys are not located in "default" .ssh directory becuse of Cirillyc issue, see attached files for current workflow / errors, so how I could provide custom ssh keys path?
Tomorrow I'll try set up user.name and user.email on previous PC - hope that it will resolve that username problem. See ya. Thx for your time.
P. S.
Does your team have IRC channel or something like it for example public skype chat? And sorry for poor english?
P. P. S
Well there http://help.github.com/troubleshooting-ssh/ I find how workaround keys path (1st test with out any path changes, second - after I moved keys to C:\Program Files\Git\.ssh)
?<?вцп-ня ?<їа-@AMSTERDAM / $ ssh -v git@github.com OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007 debug1: Connecting to github.com [207.97.227.239] port 22. debug1: Connection established. debug1: identity file /.ssh/identity type -1 debug1: identity file /.ssh/id_rsa type -1 debug1: identity file /.ssh/id_dsa type -1 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debia n-5github2 debug1: match: OpenSSH_5.1p1 Debian-5github2 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_4.6 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-cbc hmac-md5 none debug1: kex: client->server aes128-cbc 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: Host 'github.com' is known and matches the RSA host key. debug1: Found key in /.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: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Trying private key: /.ssh/identity debug1: Trying private key: /.ssh/id_rsa debug1: Trying private key: /.ssh/id_dsa debug1: No more authentication methods to try. Permission denied (publickey). ?<?вцп-ня ?<їа-@AMSTERDAM / $ ssh -v git@github.com OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007 debug1: Connecting to github.com [207.97.227.239] port 22. debug1: Connection established. debug1: identity file /.ssh/identity type -1 debug1: identity file /.ssh/id_rsa type 1 debug1: identity file /.ssh/id_dsa type -1 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debia n-5github2 debug1: match: OpenSSH_5.1p1 Debian-5github2 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_4.6 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-cbc hmac-md5 none debug1: kex: client->server aes128-cbc 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: Host 'github.com' is known and matches the RSA host key. debug1: Found key in /.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: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Trying private key: /.ssh/identity debug1: Offering public key: /.ssh/id_rsa debug1: Remote: Forced command: gerve alexanderilyin 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 277 debug1: PEM_read_PrivateKey failed debug1: read PEM private key done: type <unknown> Enter passphrase for key '/.ssh/id_rsa': debug1: read PEM private key done: type RSA debug1: Remote: Forced command: gerve alexanderilyin debug1: Remote: Port forwarding disabled. debug1: Remote: X11 forwarding disabled. debug1: Remote: Agent forwarding disabled. debug1: Remote: Pty allocation disabled. debug1: Authentication succeeded (publickey). debug1: channel 0: new [client-session] debug1: Entering interactive session. debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 Hi alexanderilyin! You've successfully authenticated, but GitHub does not provid e shell access. debug1: channel 0: free: client-session, nchannels 1 Connection to github.com closed. debug1: Transferred: stdin 0, stdout 0, stderr 34 bytes in 0.3 seconds debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 110.0 debug1: Exit status 1 ?<?вцп-ня ?<їа-@AMSTERDAM / $
But PhpStom still not able to checkout. Also I tried set github token (http://help.github.com/git-email-settings/) but it doesn't resolve problem with PhpStorm.
Attachment(s):
git-clone-3.png
git-clone-2.png
git-clone-1.png
Please sign in to leave a comment.
Well this http://devnet.jetbrains.net/message/5283490#5283490 seems related to my problems but seems in my case problem compounded by Cirillyc username, even Git GUI is not workin under this account, see attachment.
P. S.
But video on http://tv.jetbrains.net/ shows how it's easy for endusers to work with GitHub =) It's NOT true... yet.
Attachment(s):
git-gui.png
once i connected to git manualy first ive had a rather good experiance with github and phpstorm :p like in fireup the cmd promt thingy for it... then phpstorm could connect
Hi Alexander,
1. Please see the Version Control console in PhpStorm and post here the detailed description of the error, which is shown to use when you try to checkout from GitHub.
2. It seems that Git GUI has some problems with Cyrillic paths indeed. Please try to clone from GitHub manually - via command line. GitHub has a nice manual for this: http://help.github.com/ but if your SSH keys are set up properly, you may need just call "git clone git@github.com:username/reponame.git"
Please tell me if command line way succeeds.