Configure CVSNT on WinXP to connect with Eclipse.

zhaozj2021-02-16  88

After a day of practice with ZM, I finally configured CVSNT in WinXP. The CVSNT version is 2.0.49

The main reference sources: http://w1.862.telia.com/~u86216121/installcvsnt.html

When you find this article, it is quite average, and Bo Berglund's website has changed ISP, so the link changed, but only old links were searched on Google, I was very hard to find the author's Email to find this article. Now introduce it entirely, lest, after the author's website is changed and can't find :)

-------------------------------------------------- -------------------------------------------

CvsNT Installation Background

Author:. Bo BerglundI have received numerous emails privately and seen a number of postings complaining about the difficulty of getting the CVSNT system up and running So to help out I have actually stepped through the process on a "naked" NT4 WorkStation and noted the different steps needed.Apart from minor operating system details (like where the path variable is set), these steps work the same way on Win NT4, Win 2000 and Win XP-Pro (I have tested all) .Notice: This guide is rewritten on dec 23rd 2002 to describe the new way of installing CVSNT that has been introduced recently. The reason I have done this is that many users have had problems getting it up and running. The guide is substantially the same as before, but it contains new screenshots From the setup sequence and tips on how to set it up correiff.

IMPORTANT -! Use a local disk CVSNT does not work properly unless the repository files are located on a disk on the local PC Do not try to use a network drive or a mapped disk (not even a mapped disk aimed at the local PC. !) It will not work and there are numerous reasons, here is one: CVSNT runs as a service and thus acts as the SYSTEM user account This account has no permissions on the network and so can not access the files if they are on a remote. server. In fact if the files are on the same PC does not help either if they are accessed using the network via an UNC path. The dive is still considered to be on the network where SYSTEM can not operate.So do not even try to create such a configuration! If you are worried about backup of the repository and you do not have a backup system running on the CVSNT server itself, then use a scheduled task that runs under a known account (like your own) and does this ( Put this Into a batch file and sun.com the schedule): Net Stop Cvsxcopy D: / cvsrepo // server / cvsbackup / Q / S / C / H / R / O / Ynet start cvsThe account you use must have permissions on the server share the files are copied to.Table of contentsCVSNT Installation stepsAdding CVS usersAdding CVS administratorsDisabling pserver as security measureThe cvs passwd command for adding usersManaging pserver usersConnection problem over named pipe with: ntserver: Using the SSPI protocolFine-tuning user access of CVSAutomatic email on commits and other eventsUsing spaces with CVSNTAdding new modules to CVS

Links: CVSMailer homepageCVSNT command referenceCVSNT homepage (where you can download the latest versions) Karl Fogel's book 'Open Source development with CVS' The free part of Karl Fogel's book in HTML format DevGuy's CVS information pages CVS-Gui (WinCvs) homepage WinCvs Dialy use Guide WinCVS 1.3 Manual (PDF Format) WinCvs Download (on Sourceforge) TCL 8.3.2 Setup, Copy ON My Websitthis Procedure Works To Get CvsNT UP and USABLE:

Note: I don't have a domain, so The Workstation Used Is Belonging to a Workgroup in A Home Lan Environment With 5 Other Machines of Various Systems (W98, NT4 WS, WIN2000PRO, XP-PRO).

Steps to take:

0. File system typeMake sure your system is only using NTFS file system! If not then convert using the NT tool for conversion. Also make sure you are logged on as an administrator of the PC (using an account with administrative priviliges) .And most Important: Use the local disk on the cvsNT server! 1. Get the Latest Release of cvsntdownload the Latest Cvsnt Installation from http://www.cvsnt.org/, currently 1.11.1.3 Build 63. (2002-12-23): CVSNT Latest version 2. Create CVS directoriesCreate two directories on the target machine, c: / cvsrepo and c: / cvstemp If you have a separate disk partition to spare for CVS then use that instead, replace the paths with these, example:. f : / cvsrepof: / cvstempThe important point here is that the disk where the repository is located on is NTFS.Where CVSNT itself is installed in not important, it can be on FAT32 or NTFS or whatever.In the discussion below I assume that C: HAS BEEN USED. 3. Directory Security and Permissionsgive C: / CVSTEMP Security Settings T Hat Allows Full Control for All Accounts Including System.Important: The Cvstemp Directory Must Not Be Located In Either C: / Winnt / Temp or Anywhere In The "C: / Documents and Settings"

tree because these locations have imposed restrictions on user access in Win2000 and Win-XP 4 Install CVSNTRun the downloaded CVSNT setup file and make sure to change the installation path to c:!. / programs / cvsnt (I am paranoid about removing any spaces in paths used by cvs) Note:! CVSNT has changed the installation system recently so you will see slightly different sceens than you are used to with InstallShield I have included a set of screens here for your reference.Start screen:. License agreement: Install directory selection: Anti-virus software warning: Installation component selection screen: Note that the CVSNT server itself may not be checked here Make sure to check all components like this:! Shortcut folder selection screen: Task selection screen: Ready to install install progressInstallation done! ! 5. Path to cvsntnote That The Installer Probably Complains About Being Unable to set the path environment variable at the end. If SO: 6. Open control panel / system and go to the environment Tab SO You can set the * system * variable path. (Location of this Setting Page Varies BetWeen NT4, W2000 and XP, You Will Have to Look Around A bit). Add;

c: / programs / cvsnt to the end of path and save it (Apply) .7 CVSNT Control Panel configurationOpen Control Panel and look for the CVSNT applet (the green fish):. Start the applet with this icon: Note: If you have problems locating the CVSNT Control Panel applet it might be because one or several of a few system dll: s are missing These are supposed to be installed by CVSNT Installer but sometimes this does not happen The files you need can be exctracted from the binary.. download of CVSNT: Precompiled binaries for CVSNTThese are the files that might be missing: mfc70.dll (needs registration) mfc70u.dll (needs registration) msvcp70.dllmsvcr70.dllCopy them to the% windows% / system32 folder.Now open the CVSNT control panel applet and do the following: 7a Check that the service is not running (Start button is enabled) If it has started then stop it This is the initial screen:.... 7b.Go to the tab "Repositories" It will initially Look Like this: now Check the check the box for prefix and browse to the di rectory c: / cvsrepo using the ellipsis button.The dialogue will look like this when you have navigated to c: / cvsrepo: Note that when you navigate to the root of your CVS repositories to set the prefix, you can not use the drive itself - you must go down at least one level in the directory tree (like to c: / cvsrepo). This is because the control panel GUI adds an erroneous extra slash to the prefix for drive roots and then the prefix stops working .... So DON '

t stop with the dialogue looking like this:.. 7c Use the Add button to add a repository Enter TEST after the prefix in the box that appears Accept the offer to create the repository You can have several separate repositories on the same server,.. in that case you will use the Add button once for each repository you need Once the list of repositories contain those you want you are done here.Note:. If you use Repository prefix and have more than one repository they must all be located at the . same top directory (= the prefix) There is only one setting for Repository prefix on CVSNT.This is how it will look like after you have created the first repository "test": Later when you return to the Control panel applet this screen will instead look like this. Note that the repository has now been stripped of the prefix.7d. Go to the Advanced tab and view the checkboxes. (Note that from build 57i the TCP / IP checkbox has been removed.) Here you have three options To set / clear: - Support NTServer Prot ocol. This is what CVSNT has been using for NT connectivity, but it is being phased out in favor of the SSPI protocol, which works over TCP / IP.- Impersonation enabled. This setting allows CVSNT to operate in the guise of the user actually Doing The Command. So with this flag on You can use file system permissions.- use local users instead of domain. Use this if you don '

t have a domain to authenticate against. Note that in this mode your users must have valid accounts on the server PC itself.For these tests check all checkboxes. You can later go back and change these settings.7e. Also set the temp dir using the ellipsis button It should be set to c:..! / cvstemp7f Now click the Apply button This is really important, nothing will happen unless you do this Note that after you have done this the Apply button is disabled:!. 8 Go back to the first tab and click the Start button After a few moments the Stop button will be highlighted.Now CVSNT runs (success!):. You might have trouble here (I did not check this) with the path variable change needing a reboot to Register. (CHECK THIS BY OPENING A Command WINDOW AND TYPE PATH (ENTER). Look for c: / programs / cvsnt in The list there is. if it is there '' f 台 reboot ...) 9. UserSthis Is A Step That Is Only Needed If You Plan ON Using The PServer Protocol with this cvs server. if Your Users Are A ll on Windows PC: s this is not recommended since it has inherent security flaws Instead use SSPI or ntserver (but ntserver is being phased out now) because these protocols integrate much better with Windows NT If you decide to go with sspi (recommended.. ) then you can skip the discussion on how to add and manage users in this section.But if you really must use pserver then: Open a command window and do the following (replace itemswith the real values ​​from your system).

Note: for ntserver the computename cannot be entered as 'localhost', IT Must Be The Real Name of the PC .:

Set cvsroot =: NTSERVER:

: / Test

CVS Passwd -a

You will now be asked to enter a password for this user. If you intend this system to be used both with ntserver and pserver then add a password for CVS that is different from the real login password for this user (security reasons). Enter the same password twice. Now the CVSROOT / passwd file will be created and the user you entered will be added to the list in this file.This step is necessary even if you are going to only use the pserver protocol in the future since there is no Way to log in with pserver unless there is a passwd file present with the user list.

Important Note:

Any User Entered Like this

Must be an NT User on the

Local System! CVS WILL NOT ACEPT Any User Login That Is Not Connected To A "Real" Account. But you can "alias" a cvs login to a "real" user by this command:

CVS Passwd -a -R

Note That THIS A Space Embedded in The Real Account Name! Don't Ever Use Spaces in There Contexts !!!!! (But use quotes May Solve the Problem Like this:

Cvs passwd -a -r "system admin" "new user"

Since I don't have a valid user with embedded Space I Could Not check The quotes Trick with the valid user name parameter, but adding a cvs login with space Embedded * can * be done with quotes.)

Note 2 (Domain users):

You Can Add Domain Uses with the folload command:

CVS Passwd -a -R

-D

This command is reported by a user to have worked for him. I can not check it because I do not have a domain. But based on information from the mail list I think that it will only work if there is a trust between the CVSNT server .

Note 3:

A User Has Reported That Before A Login That Has Been Added Like This Can Be Used The CVSNT Service Needs to Be Restarted. This Applies Towindows XP.

.

The Server is now Ready to be used and you can check the pserver functionality by doing this:

10. Testing The CVS Connection with PServer

Open another command window and type:

Set cvsroot =: pserver:

@

: / Test

Replace

and

With Valid Entries LIKE:

Set cvsroot =: pserver: charlie @ cvsserver: / test

THEN:

CVS login (Enter Password on Prompt)

CVS LS -L -R

(this kind give you a list of the file in test / cvsroot)

USING WINCVS (Ver 1.3):

Step 10 Can Be Performed from Another Computer Using Wincvs by Setting The WinCVS Preferences Like this:

Admin / Preferences / General:

Authentication: PServer

PATH: / TEST

Host Address:

User name:

THEN:

Admin / Login (Enter CVS Password for this user)

THEN IN THE Command Window In WinCVS:

CVS LS -L -R

SHOULD GIVE you 's Same Result As Above:

EXAMPLE:

Cvs -z9 loginlogging in to: pserver: bosse @ castor: 2401 / test ***** CVS EXITED NORMALLY with code 0 ***** CVS LS -L -R ***** CVS EXITED NORMALLY with CODE 0 * **** Listing Modules On ServerDirectory CvsRootcheckoutList 1.1 Sat Mar 16 23:22:16 2002commitinfo 1.1 Sat Mar 16 23:22:16 2002Config 1.1 Sat Mar 16 23:22:16 2002cvswrappers 1.1 Sat Mar 16 23:22:16 2002editinfo 1.1 Sat Mar 16 23:22:16 2002loginfo 1.1 Sat Mar 16 23:22:16 2002Modules 1.1 Sat Mar 16 23:22:16 2002Notify 1.1 Sat Mar 16 23:22:16 2002rcsinfo 1.1 Sat Mar 16 23:22:16 2002 Taginfo 1.1 Sat Mar 16 23:22:16 2002Verifymsg 1.1 Sat Mar 16 23:22:16 2002

Administrating the repository, users with admin rightsThere have been a number of reports that people have not been able to add users or execute the cvs admin command even though they were members of the Administartors group or even of Domain Admins. In order to avoid this there IS A Simple Way to Manage WHO Will Have Admin Rights on The CvsNT Server. It is done through is how to:

Create a text file called admin (no extension) inside the CVSROOT directory of the repository. Edit this file by adding on separate lines the login names of the users you want to give administrative priviliges on the CVS server.

THE FILE COULD LOOK LIKE THIS: Charliejenniferjohnnow Each of these Users Are Able To Add New Users, Change Their Passwords and use the cvs admin comman.

Disabling the PServer Protocol

If you are exposing your CVSNT server to the Internet you should disable the: pserver:.. Protocol because it uses too low security levels Only the password for login is 'encrypted' and this is only barely so All other traffic is in cleartext .. .To protect your data you should use the: sspi: protocol instead (and set its encryption flag of course) .Disabling any protocol on the CVSNT server is done by physically deleting the corresponding xxx_protocol.dll file from the CVSNT programs directory There is. No registry or other switch for this purpose.in this case. Erase the pserver_protocol.dll and then restart the service as a safty measure.

Add New PServer Uses Using The CVS Passwd Command

As soon as you are logged on using pserver with a cvs login that either is the same as a local system admin or is aliased to an admin then you can also add and delete CVS user logins with the passwd command. Here is the full syntax for This Command: USAGE: CVS Passwd [-a] [-X] [-X] [-r Real_user] [-r] [-d domain] [username] -A add user-x disable user-x delete user-r Alias ​​username to real system user-R Remove alias to real system user-D Use domain passwordExample:. cvs passwd -r charlie -a john This adds a CVS login john with a system alias to account charlie When the command is executed there will be a password dialogue that asks for the password of john twice for confirmation. Note that this is NOT the actual system password of account john, it is the CVS login password only used by CVSNT.After the command completes there will be a new line in the CvsRoot / Passwd File Looking Somewhat Like this: John: Kacit8T1F / SKU: Charliethe Part Between The: is the des encrypted password you type in an d will be used by the CVSNT service during login to validate john. Once accepted the account charlie will instead be used so the password is no longer used. The CVSNT service has full priviliges to act on charlie's behalf and this is what it does too. Managing PServer Uses

If you plan on using pserver with a fairly large number of different user logins the you might want to do as stock:

CREATE A LOCAL User On The CvsNT Server By The Name of "Cvsuser". Login to the cvs server using an admin atentem: cvs passwd -r cvsuser -a

You Will Be asked twice for the login password.

You may add as many pserver users this way as you like. They will all be individually identified by the login name even though the operations on the repository will be done in the cvsuser account context. Mail systems will recognize these user names as well (see BELOW) .connection Problems Using The: NTSERVER: Protocol

There are some reported problems that can occur when connecting to a CVSNT server using the: ntserver: protocol.The most common one is a report that the 'named pipe' could not be connected.If the client and server are on different sides of a firewall then this is quite normal since the named pipe method uses network communications that are not normally open through a firewall because they are too insecure from intrusion If this is the case for you then consider switching to the:. sspi: protocol and ask the firewall maintainers to open port 2401 through the firewall The:. sspi: protocol uses encryption for its communication and is considered fairly safe.If you are on the same network and still see the named pipe error message then this is often an indication that there is insufficient Trust Between The Client Computer and The Server. if The Two Are Me MEMBERS of The Same Domain and You Have Logged on To The Client Pc Using Domain Login Rather Than Local Login, THIS PROBLEM SHOULD NOT Appear.But in trestness:

Client is NT4WS and is not connected to the server domain. The server does not trust the workstation. Client is NT4WS and is member of the server domain, but the user logged on to a local account. The server does trust the workstation, but has no knowledge of the user account trying to connect. Client is NT4WS and the server is not connected to a domain. In this case the server does not trust the client PC and the named pipe can not be connected.WorkaroundIf you have a problem as described above you can try the following workaround: Map a drive letter on the server from the client using the 'connect as user' feature Enter a domain user account known by the cvsnt server and give its password.Check that the drive mapping works by looking at. some folders on the server.Now connect using WinCvs and verify the operation. Mostly this will work OK, but it is inconvenient to have to set up the drive mapping of course.Client is Windows XP-ProAfter switching from NT4 WS to XP-Pro As my wincvs clie NT I no longer nesed to map the drive on the cvsNT Server in Order To Connect Using: NTSERVER :. I don't know why this is so, but it us you will find the same if you go from NT4 TO XP-Pro. Note That My Production CVSNT Servers Are All W2000 Either Pro OR Server.

Using the sspi protocol for cvsNT access

Recently the SSPI protocol was added to CVSNT It works over TCP / IP so it can more easily traverse firewalls Like:.. Ntserver: the: sspi: protocol does not need a login, instead the login you did when you started your workstation is used With Protocol.i Don't Have Personal Experience Using this Protocol, But I Have Collected A Few Tips on Its Properties and Use. so here :es:

. Limiting user access with sspiWhen used normally sspi will accept connections from all system users that authenticate against the system (local or domain) Often this is not really what we want, instead we want to use the same mechansism as is used with: pserver: . Here the CVSROOT / passwd file limits the logins accepted by CVSNT to those mentioned in the file.With: sspi: this is quite possible, you only have to list the account login names that you want to give CVS access in the passwd file. You also have to set the parameter SystemAuth = Noin the CVSROOT / config file.Note that in this case there is no need for entering passwords into the passwd file, sspi uses the system login and the passwd file is only used as a list of accepted Users. SO Simply Issuing this Command WHEN Logged in As a CVS Administrator Well Work: CVS Passwd -a Newuser (Press Enter Twice To Tell Cvsnt That No Password Is Used) Fine-Tuning User Access of CVS

The NTFS File System Permissions Can Be Used to Tune The Access To The CVS Repository With More Granular Than The Passwd File Allows. Here Is How IT IS DONE:

Create a number of NT user groups where members can be added and removed easily. Do not use aliases in the login scheme, let each user login as himself. Set permissions (read / write, read only, no access) on the module level . in the repository using the CVS groups as tokens Give membership to the CVS user groups as needed to individual NT accounts Important: Create a directory outside the repository where CVS can store the lock files and make this directory read / write for all CVS usergroups. For example you can use c: / cvstemp / locks, provided you created the temp dir as instructed above Checkout CVSROOT of your repository and edit the config file so that it contains the lineLockDir = c:. / cvstemp / locksCommit your change and restart the CVSNT service using the Control Panel applet.The reason you need to create the LockDir is that you can not set a repository directory to read only because CVS needs to be able to create lock files for each operation even if the operation is not going to modify ............................

USING SPACES with CVSNT

Cvsnt Tries ITS Best to Handle Spaces Embedded in File and Directory Names. But The Use of Spaces Breaks The CVS Functionality Badly. So my firm Recommendations Are:

Install CVSNT to a path that does not contain spaces. Place the repository on a path not containing spaces. If you install additional software like PERL or RCS, do not use spaces! Instruct your users not to use spaces in filenames that are to be Handled by CVS.

People may argue that CVSNT handles these issues for them, but in my experience this is only partly true. For example the loginfo and notify script parsing breaks fully when handling files with embedded spaces. There are other places as well ... Also by allowing Spaces You Will Make It Impossible To Later Move The Repository To A * Nix System (UNIX, Linux ETC) .so You Are Much Better Off Prohibiting Spaces Up Front! Add New Modules To CVS

There Are Two Ways To Set Up A New Module In a CVS Repository, The CVS Add and The CVS IMPORT MEY HAVE SOME PROS AND CONS AND CONS Each As Follows:

CVS Importthis is The Method Mostly Talked About in CVS Tutorials and It Works Like this from WinCVS:

Activate the Create / Import menu command Navigate to the source of the module files on your hard drive Check the state of all types of files in the list and change it to suit Specify module name on the CVS server and the release and vendor tags (Import settings tab) On the General tab specify the server and repository where the module should go When you hit OK your source files will be imported into the CVS repository Now you have to check out the module to your working files area (= sandbox). you Cannot Use the source directory as your checkout target, it must be non-existing. done!

The Pro With Solution Is That All of the Files and Directories in The Source Are Imported At CONS. VERY Convenient.But The Cons Off The Immman:

The imported files per default wind up on a branch and get the revision 1.1.1.1 There is no security for this command! If there already exists a module on the server with the name you are giving the new module then the command happily adds your files to the existing module and adds new to may already exist even revisions those files that! This most probably will destroy the existing module's structure! cvs addThis method is seldom mentioned for main module additions, basically because it is a bit labor intensive ...

Create / Checkout Module from WinCvs menu Enter a single. (Period) as the module name to check out in the 'Checkout settings' tab Browse to the folder on your working files disk where you have the source files and set the' Local folder to check out to 'to the folder where this folder is stored (one level up). Check the' Do not recurse 'checkbox. This is important! On the General tab make sure the server data are correct After you give the OK command there will be one single folder (CVS) created in your sandbox Now change location in WinCvs to the folder containing your sources folder. There will be a black checkmark on the parent folder. Select the module folder in the right hand panel and click the Add button. A checkmark will appear. Move into this folder and select all text files inside that need to be part of the module and click the Add button. They turn red. Also do the same for the binary files, except click the 'Add binary' button INSTEAD. NOW SELECT The Module Folder in The Lef .

ProS of this Solution:

All files are starting out on the TRUNK with revision 1.1 If the module is already existing on the server there will be an error message You can continue working with your sources from the location they were in, no need for a checkout to create the working file Set (SANDBOX). You Have Effectively Converted Your Existing Source Files To a Versioned Checkout.cons of this Solution:

Every Single Folder and File Must Be Individally SELECTED and SUBFOLDERS.

As usual the method selected for module creation will depend on preferences. If you really do not want initial revisions to be on the branch and you want to be sure an existing module is not overwritten then use the cvs add method.If on the other Hand you don't have the time uededed the used the cvs import, which is inherently faster. But be aware of the security risk you may encounter ....

Afterwords

The Above Is Revised 2002-12-23 and is based on using the cvsnt version I have current access to (1.11.1.3 build 63) .i Hope this helps those of you who could not get cvsnt to work.also note that build 51 has a serious bug in the passwd command that actually mangles the file contents so it will be unusable Therefore you MUST use the most recent version from CVSNT for the instructions above to work.Comments Send me a message:.? Bo Berglund

-------------------------------------------------- ---------------------------------------------

In the above article, the picture is old, but basically does not affect the installation, the main settings of CVSNT can be made below.

One thing to emphasize again, the CVSNT Temporary directory and repositories must be set on the NTFS format, otherwise there will be a problem.

When using the Eclipse IMPORT, you can remember to upload the Navigator to switch your work environment, otherwise it will miss the .classpath and .project files.

转载请注明原文地址:https://www.9cbs.com/read-14180.html

New Post(0)