Redhat.com Cygwin mkpasswd page
Why is my CVS account name different from my website account name?CVS accounts are just a restricted form of UNIX
account. Because of this, when you get a CVS user
account, you also get registered as an account-holder
in the EECS departmental database. If you already
have an EECS account, then you will get the account
name that the Department already has you registered
as.
However, if you do not already have a record
in the departmental database, we create a new record
for you. Sometimes, your website username is
already taken, in which case we have to give you a different
one.
If your login name and your CVS account name
are not the same, then you can try one of the methods below
yourname@gigasource
When using the -d cvs option, try
using yourname@gigasource.eecs.berkeley.edu
cxh@maury 29% cvs -d :ext:ptolemy@gigasource.eecs.berkeley.edu:/home/cvs co ptII
ptolemy@gigasource.eecs.berkeley.edu's password: the passwd
cvs server: Updating ptII
ssh_config
You can modify the
ssh_config file so that when you
connect with ssh, you use your CVS account name.
Under Unix, the file to modify is
~/.ssh/ssh_config, under Windows
try
c:sshetcssh_config.
The format of the file is the same under
Unix and Windows, the thing to do is to add a
User your cvs account name:
Host *
ConnectionAttempts 100
RhostsRSAAuthentication yes
User cxh
Note further that to use ssh as
a different use, use the -l username
option, and to use scp, use
-o user=username
Under Cygwin, I get 'could not create directory /home/myname/.ssh'If, under Windows when running cvs via Cygwin you
get a message like:
Could not create directory '/home/yourname/.ssh'.
The authenticity of host 'gigascale.eecs.berkeley.edu 128.32.171.xxx)' can't be established.
RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/yourname/.ssh/known_hosts).
yourname@maury.eecs.berkeley.edu's password:
then the problem is that Cygwin has the wrong
idea about where your home directory is.
See CVS thinks I'm Administrator, not myself for how to
fix this.
Cygwin CR/NL problemsWhen Cygwin is installed, you should be sure to select
DOS for the Default Text File Type.
If you do not, then when you check in files, there
will be problems with the DOS CR/NL line endings.
In particular, what will happen is that when you
check in a file and then someone checks it out, it
will have extra \r or ^M characters.
The way to tell if this is a problem is to run
the mount command under Cygwin bash and
note whether the c: drive is mounted
textmode or not. If the c:
drive is mounted textmode, then
your setup is ok:
$ mount
c:\cygwin\bin on /usr/bin type system (textmode)
c:\cygwin\lib on /usr/lib type system (textmode)
c:\cygwin on / type system (textmode)
c: on /cygdrive/c type user (textmode,noumount)
However, if c: is mounted binmode,
then you have problems:
$ mount
c:\cygwin2\bin on /usr/bin type system (binmode)
c:\cygwin2\lib on /usr/lib type system (binmode)
c:\cygwin2 on / type system (binmode)
c: on /cygdrive/c type user (binmode,noumount)
The fastest solution is to reinstall Cygwin,
see How do I edit pages in a group with the "CVS Authoring" option?
and properly select
DOS for the Default Text File Type.
Another possible alternative is to use these mount
commands:
We have tried these commands but they have not
quite worked for us
mount -f -t -s c:\\cygwin\\lib /usr/lib
mount -f -t -s c:\\cygwin\\bin /usr/bin
mount -f -t -s c:\\cygwin /
mount -f -t c: /cygdrive/c
If you have a d: drive,you may need to do:
mount -f -t d: /cygdrive/c
When you are done, run mount, which should
show all the mounts as textmode.
The reason that this is a problem with CVS is that
CVS handles end of line translation between Unix and Windows.
If, under Cygwin, the directories are mounted
binmode, then Cygwin CVS will not do
the proper translations.
For details, see
How is the DOS/Unix CR/LF thing handled? in the Cygwin FAQ
See also
http://cygwin.com/cygwin-ug-net/using-textbinary.html
To replicate the problem, install Cygwin with Unix line
endings, check out a file using CVS, edit the file using
wordpad and check in your changes. When you check out
the file under Unix, it will have \r\n
line endings.
Note that there is some contention about whether
DOS or Unix line endings are correct. The TinyOS community
has required Cygwin to be set up with Unix line endings,
which works great if your users are technically
sophisticated. However, if your windows users do not have
much exposure to Unix, then configuring Cygwin to use
DOS line endings is more correct.
Who can get a CVS account?Anyone that has a reason to :-)
Seriously, the only requirements are that
you have an account on the GSRC website and are
working on a software development project that
is located on the GSRC CVS server.
There are two types of cvs access:
If you are or intend to be working on a software
project that doesn't yet have a CVS repository
on the GSRC server, then by all means
request a login (if you don't already
have one), and then request
a group so that your project can start using the
GSRC infrastructure. All that we require is that at
least one person actively working on the project
has a bona-fide connection to the GSRC in some way.
How does anonymous password authentication work?Some of the repositories have anonymous cvs access, which
allows anonymous users read only access
The ptII repository moved to svn in 2008. The cvs
commands below are an example of how anonymous
authentication can work
The Ptolemy II External Developers workgroup (ptexernal)
was set up to allow for anonymous read only access to
the Ptolemy II tree. After getting the password,
the commands to run were:
cd c:/directoryofyourchoice
cvs -d pserver:anon@source.eecs.berkeley.edu:/home/cvs/cvsanon login
# No password needed, hit enter
cvs -d pserver:anon@source.eecs.berkeley.edu:/home/cvs/cvsanon co ptII
The old instructions used a password from
http://chess.eecs.berkeley.edu/ptexternal/private/2.html.
cvs -d :pserver:ptdeveloper@gigasource.eecs.berkeley.edu:/home/cvs/cvsanon login
cvs -d :pserver:ptdeveloper@gigasource.eecs.berkeley.edu:/home/cvs/cvsanon co ptII
However, that repository was moved in July, 2005.
The best reference is
CVS Book: Password Authenticating Server Section
Troubleshooting
Anonymous read only cvs access uses the pserver facility
which is found on port 2401. If you are behind
a firewill, you may have problem connecting to port 2401
on gigasource. The way to test this is to use
telnet gigasource.eecs.berkeley.edu 2401
to try to connect to the pserver port, and then type
help:
cxh@maury 21% telnet gigasource.eecs.berkeley.edu 2401
Trying 128.32.171.225...
Connected to gigasource.EECS.Berkeley.EDU.
Escape character is '^]'.
help
cvs [pserver aborted]: bad auth protocol start: help^
Connection closed by foreign host.
cxh@maury 22%
If you are running under Windows, then you may
find that the Cygwin telnet binary gives better
diagnostics.
Also, the CVSROOT/config file should be set up to
look like
# Set this to "no" if pserver shouldn't check system users/passwords
SystemAuth=yes
Administrivia
Setting up anonymous read only cvs access
As the administrator of a group,
send email to www@gigascale.org
requesting that anonymous read only cvs access be
setup for your cvs repository.
The website maintainers will:
- Create a link for your repository in
/home/cvs/cvsanon
cd /home/cvs/cvsanon
ln -s ../yourrepository .
- Each workgroup should have their own
anonymous cvs account so that password
administration is easier.
The accounts are listed in
/home/cvs/cvsanon/CVSROOT/passwd
and look like
accountname:encrypted password:cvsanon
cvsanon is the name of the account
that we actually log in as.
- To generate an encrypted password, run
cryptout.pl with the password
gigasource:root: %C2> /usr/local/bin/cryptout.pl foobar
oPG6N3As668O2
gigasource:root: %C2>
and then placing that encrypted password in
a new password entry in
/home/cvs/cvsanon/CVSROOT/passwd
Other details
Note that anonymous read only cvs access sends passwords
over in clear text with a very simple encryption scheme.
Thus, this method is really only useful for shared accounts
since with individual accounts users tend to use the same password
for many different accounts so if their cvs password gets
snooped, other accounts could be compromised.
Note further that the lightly encrypted password
is stored in ~/.cvspass.
Readonly access is controlled by adding users
to /home/cvs/cvsanon/CVSROOT/readers
/etc/services and /etc/inetd.conf
were modified with the following:
gigasource:root: %C2> grep pserver /etc/services
cvspserver 2401/tcp
gigasource:root: %C2> grep pserver /etc/inetd.conf
cvspserver stream tcp nowait root /usr/local/bin/cvs cvs --allow-root=/home/cvs
/cvsanon pserver
gigasource:root: %C2>
xinetd setup (for Linux)
To set up xinetd, I created /etc/xinetd.d/cvspserver:
service cvspserver
{
socket_type = stream
protocol = tcp
wait = no
user = root
passenv = PATH
server = /usr/bin/env
server_args = -i cvs -f --allow-root=/usr2/cvsroot --allow-root
=/home/real/cvsroot pserver
}
This also worked:
service cvspserver
{
socket_type = stream
protocol = tcp
wait = no
user = root
passenv = PATH
server = /usr/bin/cvs
server_args = -f --allow-root=/usr2/cvsroot --allow-root=/home/
real/cvsroot pserver
}
Then I did /etc/init.d/xinetd restart
Solaris 10 Notes
Under Solaris 10, I set up /etc/inetd.conf
as before, but then ran
inetconv -e to convert the cvspserver entry.
Add the following rules to /etc/ipf/ipf.conf
pass in quick on bge0 proto tcp from any to 128.32.48.234 port = cvspserver flags S keep state group 100
# CVS
pass out quick on bge0 proto tcp from 128.32.48.234 to any port = cvspserver flags S keep state group 200
Run ipf -F a -f /etc/ipf/ipf.conf
How do I convert from SCCS or RCS to CVS
Resources:
Converting from SCCS to CVS is not that difficult, there
are scripts in the contrib directory that
is shipped with the cvs source code. The basic idea
is that one backs up the SCCS tree, converts to RCS and then
converts to CVS.
The notes below discuss the conversion of the Ptolemy II SCCS tree
to CVS.
Converting from RCS to CVS
Once you've converted from SCCS to RCS, you need to convert
from RCS to CVS.
The CVS info documentation says:
From RCS
If you have been using RCS, find the RCS files--usually a file
named `foo.c' will have its RCS file in `RCS/foo.c,v' (but it
could be other places; consult the RCS documentation for details).
Then create the appropriate directories in CVS if they do not
already exist. Then copy the files into the appropriate
directories in the CVS repository (the name in the repository must
be the name of the source file with `,v' added; the files go
directly in the appopriate directory of the repository, not in an
`RCS' subdirectory). This is one of the few times when it is a
good idea to access the CVS repository directly, rather than using
CVS commands. Then you are ready to check out a new working
directory.
The RCS file should not be locked when you move it into CVS; if it
is, CVS will have trouble letting you operate on it.
A CVS training manual says:
9.1 Moving from RCS to CVS
Migration from RCS to CVS is a relatively painless process. CVS uses RCS for all of its file level version control, and so RCS files can be directly
copied into a CVS repository.
In converting from RCS to CVS, make sure that you follow these steps:
Create a CVS repository. Within this repository you should
create an empty directory structure to hold the RCS files.
Keep a backup copy of your RCS files in their original location
just in case there are any mishaps.
Copy the files into the repository using the standard unix file
copy utilities (cp -rp is useful, as is tar).
Update the modules file in CVSROOT. This can be updated using cvs
co modules or cvs co CVSROOT, editing the modules file, and
checking it back in again. You should make sure that there is an entry in the modules file for every directory (top level and subdirectory) in the repository.
Test the change by attempting to cvs co a few of the new modules
you have created, and running cvs log or cvs status on some of the
files you have checked out.
Steps to convert one directory from SCCS to CVS
-
sccs2rcs
-
co RCS/*
Steps to convert a tree from SCCS to CVS
- Cleanup, removing .class files and codeDoc
make distclean
cd ptolemy
find . -name "*.class" -exec rm {} \;
find . -name "*codeDoc" -exec rmdir {} \;
- Be sure that there are no files checked out
cd ~ptII
make sccsinfo
/users/ptII/adm/cvs/unsccsedit might help for testing
- You may want to remove all the extra sccs files
that are not being used. One way to do this is to
do a
sccs get SCCS in all the directories
and then run make checkjunk and move
the SCCS files to a junk directory.
- The following script located at
/users/ptII/adm/cvs/getallsccs
will get all the SCCS files
#!/bin/sh
homedir=`pwd`
dirs=`find . -name SCCS -print`
for dir in $dirs
do
echo $dir
cd $homedir
cd $dir/..
sccs get SCCS
done
- The run
make checkjunk
- If you place the output of
make checkjunk
into a file, then run the script below to generate
another script that will move the junk files into
a junk directory.
#!/bin/sh
grep 'Extra files' sccsfiles | sed 's@Extra files in /export/carson/carson2/cxh/tmp/ptII/@@' | sed 's/://' |
awk ' { print "mkdir -p /users/cxh/tmp/junk/"$1"/SCCS"
for(i=2;i<=NF;i++) {
print "mv "$1"/SCCS/s."$i" /users/cxh/tmp/junk/"$1"/SCCS"
print "mv "$1"/"$i" /users/cxh/tmp/junk/"$1
}
}
- Repeat running
make checkjunk
the script above and the output script until
make checkjunkfinds no garbage:
make checkjunk >> sccsfiles
moveoldsccs > moveoldsccs.sh
sh moveoldsccs.sh
and repeat
- Convert from SCCS to RCS:
/users/ptII/adm/sccs2cvs/sccs2rcsall -q
sccs2rcsall is a locally modified
version of contrib/sccs2rcs that
is shipped with the cvs sources. The version
that is shipped with cvs has y2k hacks not
present in the local copy, so use the most
current version from the cvs sources.
- Check that there are no SCCS directories:
find . -name SCCS -ls
If there are any, fix the problems and rerun
sccs2rcsall
- Check out all the files from RCS
/users/ptII/adm/sccs/2cvs/coall
coall looks like:
#! /bin/sh
# Check out all the files from RCS in a tree
dirs=`find . -xdev -type d | egrep -v "SCCS|adm|RCS|CVS|codeDoc"`
homedir=`pwd`
for dir in $dirs
do
echo $dir
cd $dir
co RCS/*
cd $homedir
done
- Initialize the repository
setenv CVSROOT ~/tmp/ptII/Repository
cvs init
- Convert from RCS to CVS
cd ptII
/users/ptII/adm/cvs/ptrcs-to-cvs ptII
ptrcs-to-cvs is a version of
cvs-1.11/contrib/rcs-to-cvs with the following changes:
cxh@maury 67% diff -c ~/src/cvs-1.11/contrib/rcs-to-cvs ptrcs-to-cvs
*** /home/eecs/cxh/src/cvs-1.11/contrib/rcs-to-cvs Mon Sep 25 18:59:01 200\
0
--- ptrcs-to-cvs Thu Nov 12 14:01:25 1998
***************
*** 90,96 ****
if [ -d SCCS ]; then
echo SCCS files detected! >&2
! exit 1
fi
if [ -d RCS ]; then
co RCS/*
--- 90,97 ----
if [ -d SCCS ]; then
echo SCCS files detected! >&2
! #exit 1
! exit 0
fi
if [ -d RCS ]; then
co RCS/*
***************
*** 99,105 ****
for name in * .[a-zA-Z0-9]*
do
case "$name" in
! RCS | *~ | \* | .\[a-zA-Z0-9\]\* ) continue ;;
esac
echo $name
if [ $vbose -ne 0 ]; then
--- 100,106 ----
for name in * .[a-zA-Z0-9]*
do
case "$name" in
! Repository | RCS | SCCS | old-SCCS | adm | codeDoc | *~ | \* | .\[a-zA-Z0\
-9\]\* ) continue ;;
esac
echo $name
if [ $vbose -ne 0 ]; then
***************
*** 158,171 ****
echo "MSG: Copying old rcs file."
cp RCS/"${name}",v "$file"
else
! if [ -n "${comment}" ]; then
! rcs -q -i -c"${comment}" -t${message_file} -m'.' "$file\
"
! fi
! ci -q -u1.1 -t${message_file} -m'.' "$file"
! if [ $? -ne 0 ]; then
! echo "ERROR: Initial check-in of $file failed - abortin\
g" >&2
! exit 1
! fi
fi
else
file="${update_dir}/Attic/${name},v"
--- 159,174 ----
echo "MSG: Copying old rcs file."
cp RCS/"${name}",v "$file"
else
! echo "MSG: not checking in $name, since it is not in RCS"
!
! #if [ -n "${comment}" ]; then
! # rcs -q -i -c"${comment}" -t${message_file} -m'.' "$fil\
e"
! #fi
! #ci -q -u1.1 -t${message_file} -m'.' "$file"
! #if [ $? -ne 0 ]; then
! # echo "ERROR: Initial check-in of $file failed - aborti\
ng" >&2
! # exit 1
! #fi
fi
else
file="${update_dir}/Attic/${name},v"
I got "Failed to connect after 6 attempts . . ."If you use CVS several times in succession, then you
may see a message like
Failed to connect after 6 attempts, try again in a few minutes or use
'-oConnectionAttempts 1000'
cvs [update aborted]: end of file from server (consult above messages if
any)
The reason that this occurs is because Windoze does not close sockets promptly.
The fix is to create or edit c:/ssh/etc/ssh_config
and add
Host *
ConnectionAttempts 100
cvs update is slowThere are many reasons why cvs update
could be slow.
Network Connectivity
The most common reason for CVS to misbehave is poor
network connectivity.
If you have DSL, see the
DSL Troubleshooting FAQ.
Below are some things to try:
- Reboot - Often the quickest solution.
- In a separate window, trying pinging gigasource
while running the cvs command, and then hit
Control-C
and look for dropped packets in the output.
ping -t gigasource
SSH has a hard time with packet loss greater than 3%.
- Be sure that names are properly being resolved, try
nslookup gigasource
- Sometimes it seems like starting over and checking
out a new tree is necessary. This is especially true
if you have been having network connectivity problems
because of dropped packets.
- (A long shot): If no packets are getting through and your machine
is usually on the UCB EECS 171 network and now
you are at home connected via modem,
then you might have route problems
where your machine is routing 171 net packets to
the ethernet port instead of the modem.
If this is the case and you are connected via modem, run
route print
and be sure that you have no 171 network entries.
CVS
SSH
- Verify that ssh is working with
ssh -v gigasource cvs --help
How do I set it up so that I get email whenever someone commits a change?To set up email for CVS or Subversion:
- Email will be set to people with
developer accounts
in a workgroup. To enable the developer choice,
the admin of the workgroup should go to Admin -> Group Profile and select Software Project
- the admin of
the workgroup should go to the Admin->Configure Group page
and click on the
CVS mail list checkbox
- then
hit the
Change group configuration button
at the bottom.
This will send email to the GSRC website managers
who will create the mailing list and edit the
loginfo file.
If a workgroup member would like to get email about
cvs changes, they should go to
Options -> Membership and request a Developer account for
the corresponding workgroup.
(Website managers: the instructions for what to do for CVS are in the Infrax FAQ:
How do I set up cvs mail?
or in the dopsysadmin: How do I set up CVS mail?
For Subversion, see
Setting up SVN Email)
See also How do I send commit log messages to a mailing list?
and
E-mail Notifications
Cygwin copy and pasteYou may need to enable copy and paste in the bash shell window.
If copy and paste are working properly, then you should be able to
highlight text by left clicking and dragging the mouse over the text
and then hitting the Enter key to copy the highlighted text.
The Cygwin faq at
http://www.cygwin.com/faq/faq.html#SEC54
says:
How can I copy and paste into Cygwin console windows?
Under Windows NT, open the properties dialog of the console
window. The options contain a toggle button, named "Quick edit
mode". It must be ON. Save the properties.
Under Windows 9x, open the properties dialog of the console
window. Select the Misc tab. Uncheck Fast Pasting. Check QuickEdit.
You can also bind the insert key to paste from the clipboard by adding
the following line to your .inputrc file:
"\e[2~": paste-from-clipboard
More precisely:
- Start up bash by doing Start -> Programs -> Cygwin -> Cygwin Bash\
Shell.
- Right click on the icon in the upper left of the title bar and select
properties
- Under Options, select 'QuickEdit Mode', hit ok
- Select 'Modify shortcut that started this window', hit ok
To copy from a Cygwin Bash window, highlight the text
by left clicking and dragging the mouse, then hit
the enter key to copy the text.
To paste into a Cygwin Bash window,
click on the icon in the upper
left of the window menu bar and then do edit -> paste
or do Alt-Space e p
That is, hold down the Alt key, hit the
space bar, let up on
the Alt key, type an e and then a p.
Is there a web interface to the CVS repositoryNo, there is no webcvs view.
The basic issue is that it is tricky to integrate a web
server based solution into our current permission scheme on the
website. Using a full blown client that uses ssh to access the
repository is probably better than using a client on the web server.
Jorn Janneck wrote:
it seems that these days there are a number of decent user
interfaces to cvs. intellij, e.g., has a very nice cvs integration,
including visual display of conflicts, and i hear that so does
eclipse (never tried it with cvs myself), and i think jbuilder. of
course, these are programming ides---if that is too heavy, i believe
that there are a number of graphical cvs-only frontends, which i
never used though, because i am very happy with intellij. a list of
those can be found here: http://www.wincvs.org/
SVN vs CVSI've not set up a SVN repository, I'm sure it is fairly easy.
I have set up a CVS repository. Setting up CVS is very easy.
If people have ssh access to the repository, then you are done.
Setting up anonymous access (pserver) is not that hard.
See anonymous access
Lots of people swear by SVN and swear at CVS. One issue is
that I'm not so sure Eclipse supports SVN out of the box,
though there is the subclipse plugin.
That's what stops me from switching.
In general, one issue I've found is that people tend
to jump to the newest technology for odd reasons.
Yes, the CVS command line and branching mechanism sucks
and SVN is "better". However, are you willing to
toss access via Eclipse out of the box if you go
with SVN? I'm sure there is a SVN interface to
Eclipse, but why make installation even more complicated
for users who are already struggling?
I think it is better to set up CVS or SVN on a Linux box
than a Windows box. One issue is that the Windows so called
file system is case insensitive, case preserving, which
means that if under Unix there are two filenames differing
only in case, then god knows what happens if the
CVS or SVN server is on Windows.
How do I use CVS on the Mac under OSXTo use CVS on the Macintosh, you should install Xcode, which is about 1 gig in size!.
Other resources: