Reference link: http://www.zend.com/forums/index.php?t=msg&S=9af35135701c2c5503e06156dee05a15&th=2970&goto=8121
After spending an entire day trying to figure out how to get ZS to work with SVN repo that i got from my hosting service, i finally found a solution.
I figure this should save some of you from the same "fun" i had to go through.
Chances are that you are reading this either because you tried clicking 'Check Out' from Tools->Subversion and you got a weird error message or when you attempt to check out, it tries to connect and hangs.
Applications you need:
PuTTY, Pageant, Plink, PuTTyGen
I will go over all steps, so feel free to skip ahead.
All 4 apps are made by the same person (group of people) and are available for download for free from:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.h tml
PuTTY is your basic terminal emulator application. You use it to connect to telnet/ssh servers. At this point you really shouldn't need an explanation as to what putty does.
Plink is "putty in batch mode". it will not give you a nice window you can use to interact with the server. instead you can specify which commands it should execute when you run it and it will output the result in the command prompt window...STDOUT
Pageant and PuttyGen deal with public/private keys.
Puttygen will generate keys and Pageant will provide key info to putty/plink upon connection.
The way SVN+SSH works is that SVN opens a tunnel using SSH and then just sends all commands and data over it.
I would suggest you to save the 3 apps (putty, puttygen, pageant) somewhere in the default %PATH%, (e.g.: c:windows) so that you can run them from anywhere, including Start->Run
1. Download PuTTY, Pageant, Plink, PuTTyGen
2. Copy (Move) plink.exe to C:Program FilesZendZendStudio-5.5.0binSourceControlsvn
3. Rename plink.exe to ssh.exe
4. [In Putty] Connect to your server
5. you need to generate a public/private key pair. Enter: (without $)
$ ssh-keygen -b 1024 -t dsa -N <passphrase> -f key
Where <passphrase> should be some password/secret word/bla (doesn't have to be the same as your server password)
Running that command will generate 2 files, key and key.pub
file key has the private key and file key.pub has the public key
6. $ mkdir ~/.ssh
This line assumes that the currently logged-in username is the one that will be used for SVN connections
7. $ cp key.pub ~/.ssh/authorized_keys
You can close putty for now.
8. use some FTP/SFTP client to download the key (not key.pub) file to your local computer
9. Run PuttyGen
10. In PuttyGen click Conversions->Import Key
11. Browse to the key file you have just downloaded
12. Enter the passphrase you have specified
13. Click "Save Private Key"
PuttyGen will offer you to browse to a location to save the new .ppk (putty private key) file. Save it as whatever you want. You can close Puttygen -- you won't need it for now.
14. Run Pageant -- it will place itself into the system tray
15. Open Pageant window and click 'Add Key'
16. Browse for the .ppk file you've just created
17. Enter the same passphrase as you used before
There now should be a new entry in Pageant list.
You can close Pageant window.
You can now either jump into ZS, or keep reading...
If you want to make it easier to connect to your SVN repo so that you dont have to enter the full address _every time_ you can save the connection info.
1. open putty
2. Enter the following (in corresponding fields):
Session->Host Name: hostname/ip of the server
Session->Saved Sessions: some connection identifier ("my_svn" ?)
Data->Auto-login username: your username
3. Go back to Sessions and hit 'Save'
You can close Putty now
4. Now, in ZS Subversion connection window, all you need to enter is
Module URL: svn+ssh://my_svn/path/to/repo
(This line assumes that you have saved the connection info in putty as "my_svn")
you dont need to enter username, password, etc.
Just hit OK and you are ready to kick as$ and chew bubble gum.
If you are wondering how does ZS know about your putty settings -- recall that you downloaded Plink into the zs main dir. all putty-related applications (which plink is one of) share preferences, profiles, and connection settings.
Something to keep in mind:
Pageant must be running and it must have the key information. Each time you start Pageant, you have to re-add the key.
Pageant will not only let you use the whole SVN+SSH in ZS, but also youll be able to connect to the server in putty without having to enter the password, so don't leave your station unattended or your fancy new php project might start outputting "all your base are belong to us -- crash override/zero cool"
I hope you'll find this doc useful.
PS: let me know if i missed something in the doc.
HOW-TO: Using SVN+SSH in Zend Studio 5.5
Reference link: http://www.zend.com/forums/index.php?t=msg&goto=8129&S=65463b1107074808159b0e05ef46b1ab
It's not very friendly for Zend Studio to using SVN with SSH+SVN scheme. I found this link is useful with that.
- Copy (Move) plink.exe to C:Program FilesZendZendStudio-5.5.0binSourceControlsvn
- Rename plink.exe to ssh.exe
- Run Pageant -- it will place itself into the system tray
- Open Pageant window and click 'Add Key'
- Browse for the .ppk file you've just created
- Enter the same passphrase as you used before
SVN - SSH connection produces errors
Article #201
Product: Zend Studio
http://www.zend.com/support/knowledgebase.php?kbid=201&view_only=1
Summary
When trying to connect to SVN using SSH, this error shows:
svn: Can't create tunnel: The system cannot find the file specified.
Resolution
Please follow this procedure:
1. Download and installed the TortoiseSVN client for Windows.
2. Set the following environment variable (by right-clicking on My Computer, Properties, Advanced, Environment Variables, New)
Variable name: SVN_SSH
Variable value: C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe
in some versins you will need to set this value:
Variable value : C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe -ssh
3. Reboot your machine.
4. Launch ZDE again and try to svn+ssh
The information in this article applies to
Zend Studio Client.
Keywords
svn, ssh, error, ZDE, Studio, tunnel
0 意見 (+add yours?)
張貼留言