rcls / crap

Cvs Remote Access Program
GNU General Public License v3.0
46 stars 12 forks source link

crap fails to notice my password in .cvspas #22

Open eyalroz opened 4 years ago

eyalroz commented 4 years ago

I'm trying to migrate a cvs repository to git. The repository's root is on a pserver... :-(

Now, the server uses passwords, and I have a password - in ~/.cvspass . The file has a single line, which reads as follows:

/1 :pserver:eyalroz@mozdev.org:2401/cvs abcdefghi

(but that's not the real password obviously.)

When I use crap-clone, like so:

./crap/crap-clone  :pserver:eyalroz@mozdev.org:/cvs removedupes

The password crap-clone provides is just A - which is the fallback string.

rcls commented 4 years ago

The .cvspass has the :2401 which your command-line does not.

Could you try running ./crap/crap-clone :pserver:eyalroz@mozdev.org:2401/cvs removedupes instead? Alternatively create a second line in .cvspass /1 :pserver:eyalroz@mozdev.org:/cvs abcdefghi

I'm happy to accept patches to be flexible about the 2401, but no longer having the misfortune of being a cvs user, I'm unlikely to do that myself.

eyalroz commented 4 years ago

With the port number, this works. I'd say the thing to do is:

  1. Realize we've gotten a resource identifier with a port number.
  2. Search for the identifier regardless of the port number.
  3. When found, also determine whether the port number is there.
  4. If it is, take that line's password and quit
  5. If it isn't, take that line's password but continue scanning in case the identifier with the port number is in the file.

Sounds reasonable?

eyalroz commented 4 years ago

Oh, something else to support would be specifying the password as a command-line argument.

eyalroz commented 4 years ago

See also issue #24 .