Sometimes getting Eclipse to work with CVS can be difficult. It took me a long time, but eventually I found a solution, which surprisingly worked. Basically, I set up plink to use ssh public key authentication authentication. I stored the public key in the authorized key file on the cvs server in my user's home directory: ~/.ssh folder.
The step were as follows:
First putty's puttygen utility was used to generate a key pair. In my case, I used a SSH2-DSA 2048 key, which looked as follows:
Then he contents from the textfield with the label "Public key for pasting into OpenSSH authorized_keys file:" were copied into the authorized_keys file in the ~/.ssh directory of the unix user who was used to access the CVS repository. The contents of the authorized_keys file looked like this:
In eclipse, the "Ext Connection Method" was configured as follows:
Notice that the "-i" parameter, which points to the file containing the private key generated above using puttygen. Here, in this example, the private key was NOT protected with a password when it was saved from puttygen; probably not a good idea.
Now in Eclipse, set up a CVS repository as follows:
Notice that the connection type is "ext" and that the user and password are set. In my case, the password had no affect because I was using public key authentication and because my private key was not protected with a password. It could be that the password here might be used to access the private key, but I'm not really sure about it and didn't test it.
Another factor which might have an affect on the functioning of the above configuration and which has not be investigated because of time constraints is:
In the initialisation file of the unix user with which CVS was accessed, I set the path to the CVS client and added it to the working PATH as following:
export CVS_HOME=/opt/sfw/bin
export CVS_SERVER=${CVS_HOME}/cvs
export PATH=$PATH:$CVS_HOME
echo "CVS_SERVER=${CVS_SERVER}"
No comments:
Post a Comment