1. 在windows xp上安裝cvs伺服器端,cvsnt
2. 在指令行視窗中首先登入cvs,指令如下:
cvs -d :pserver:[email protected]:/mycvsworkspace login 注:這裡要用自己作業系統的管理者使用者代替administrator
3: 添加使用者
cvs -d :pserver:[email protected]:/mycvsworkspace passwd -a liss
這樣就建立了使用者名為liss的賬戶,此時在cvs的安裝目錄下會生成一個passwd檔案,裡邊存儲着使用者名和經過linux加密後的密碼。這時候如果用指令cvs -d :pserver:[email protected]:/mycvsworkspace login 登入系統,可能會提示liss是無效的使用者(在有的機器上這時使用者就成功建立不會提示無效使用者,後面這條指令也就無需執行,暫且不知道為何不同的機器有這種差異),需要再執行如下指令将該使用者與作業系統使用者綁定:
4:cvs -d :pserver:[email protected]:/mycvsworkspace passwd -r administrator(作業系統使用者名) -a liss
這時passwd檔案中的記錄變為liss:***(加密的密碼): administrator(liss使用者的别名)
現在用戶端可以用liss使用者來share project了。
到 這裡又出現了另外一個問題,用liss來share project以後,在伺服器所在的機器上可以通過import from cvs repository來導入項目,但是在 其它機器上就提示connection failed或者connection time out的錯誤。這是由于伺服器端的防火牆的原因,在控制台->安全中心->例外中,為端口2401,2402關閉防火牆即可。
c:\documents and settings\administrator>cvs -d :pserver:[email protected]:
/thstat login
logging in to :pserver:[email protected]:2401:/thstat
cvs password:
/thstat passwd -a liss
adding user
new password:
verify password:
cvs server: *warning* cvs user 'liss' will not be able to log in until they are
aliased to a valid system user.
/thstat passwd -r administrator -a liss
/thstat passwd -r administrator -a zengcs
/thstat passwd -r administrator -a liub
c:\documents and settings\administrator>
參考:
cvs添加使用者的過程和指令清單
cvs添加使用者的過程
d:\cvs\cvsroot>set cvsroot=:pserver:[email protected]:/cvs
d:\cvs\cvsroot>cvs login
logging in to :pserver:[email protected]:2401:/cvs
d:\cvs\cvsroot>cvs passwd -a lrj
cvs可供使用的指令
cvs commands are:
add add a new file/directory to the repository
admin administration front end for rcs
annotate show last revision where each line was modified
chacl change the access control list for a directory
checkout checkout sources for editing
chown change the owner of a directory
commit check files into the repository
diff show differences between revisions
edit get ready to edit a watched file
editors see who is editing a watched file
export export sources from cvs, similar to checkout
history show repository access history
import import sources into cvs, using vendor branches
init create a cvs repository if it doesn't exist
info display information about supported protocols
log print out history information for files
login prompt for password for authenticating server
logout removes entry in .cvspass for remote repository
ls list files in the repository
lsacl list the directories access control list
passwd set the user's password (admin: administer users)
authserver authentication server mode
rannotate show last revision where each line of module was modified
rdiff create 'patch' format diffs between releases
release indicate that a module is no longer in use
remove remove an entry from the repository
rename rename a file or directory
rchacl change the access control list for a directory
rchown change the owner of a directory
rlsacl list the directories access control list
rlog print out history information for a module
rtag add a symbolic tag to a module
server server mode
status display status information on checked out files
tag add a symbolic tag to checked out version of files
unedit undo an edit command
update bring work tree in sync with repository
version show current cvs version(s)
watch set watches
watchers see who is watching a file
xdiff show differences between revisions using an external diff p
rogram
(specify the --help option for a list of other help options)
1.cvs添加使用者的過程和指令清單
d:\cvs\cvsroot>cvs passwd -a test1
為test1使用者建立新密碼,後在cvsroot檔案夾下生成一個passwd檔案,裡面放的就是repository使用者的登陸資訊,包括剛剛注冊的使用者名test1和加密後的密碼。
既然,添加使用者成功了。那接下來就用test1登陸試試了。于是,
set cvsroot=:pserver:[email protected]:/cvs
cvs login