Tuesday, September 6, 2011

How to: Skip entering password for every WinCVS action

Well,


Before making some R&D in this area I tried much of googling but no luck.  
The original motivation for me to do this tweak (yes, its a tweak) was annoyance.  Actually my m/c was changed and I have to install new WinCVS client (tortoise), which is asking for WinCVS password on every action.  


After keeping passions for almost more than 3 weeks; by this time I entered password every time Mr. Tortoise asked me to do so :( ; I decided to search how should I skip entering password every now and then.  Suddenly by doing an action; a secret :); I got an idea to try.


First, let me tell you what were the project conditions.


My old machine was going nuts in which my recent project code was synced from WinCVS.  And in new machine instead of syncing complete code I simply copied it from previous machine.  In old machine at the time of installing WinCVS and configuring I opt the option to save password and I was happy (yes, this is one of the way).  But on new machine as I already had a copied code with me and I need to find another way.


Here is the way:


Note: Before applying below changes be sure that you password would be visible at the time of WinCVS action.  Do this at your own risk.


1. If you have copied the code from one machine to another then there would be hidden CVS folder inside each sub-folder with name "CVS".  This "CVS" folder is by default hidden and contains below files:



  • Entries
  • Entries.Extra
  • Entries.Extra.Old
  • Entries.Old
  • Repository
  • Root
Here we are interested in file "Root".  The content of this file would be some thing like 
      :ssh:[username]@[IP_Address]:/usr/local/cvsroot


change it to
      :ssh:[username]:[password]@[IP_Address]:/usr/local/cvsroot
here [password] should be WinCVS password obviously.

Do above changes on the root folder of your source code.  No need to make changes in all sub-folders.

2. Hope this solves your problem, but if not, perform below additional tasks:
    We are adding your password into CVS client, I am taking example of WinCVS client tortoise.
    Go to the root of your repository and using right click of mouse button go to CVS -> checkout

    
     


Now you will find some thing like this:

            



Here in CVSROOT field change value to 

      :ssh:[username]:[password]@[IP_Address]:/usr/local/cvsroot
and in User name field
      [username]:[password]

and select "OK" button.  This will restart syncing your code which you can cancel.  

After these steps your tortoise i.e. WinCVS client would never ask you your CVS password to proceed.  

You can revert these steps in the same sequence to undo above effect.

I have done this and its working fine on my machine.


Thanks
Shailendra














No comments:

Post a Comment