开发者

Subversion: who am I logged in as?

开发者 https://www.devze.com 2022-12-31 08:51 出处:网络
I开发者_如何学运维 am working on a collaborative project, and using Subversion on Red Hat Enterprise Linux 3. I would like to know who I am logged in as. Am I logged in as myself or someone else? If I

I开发者_如何学运维 am working on a collaborative project, and using Subversion on Red Hat Enterprise Linux 3. I would like to know who I am logged in as. Am I logged in as myself or someone else? If I check in my work, what username will be associated with the commit?

I am never prompted for a username or password. When I commit changes, they just get committed under someone else's name. I would like them to be committed under my name.

I tried the "--username" option as described on this page, but it didn't seem to work. I did a commit and it was done under the other user's name. I would like some way of knowing for sure that my changes will be committed under my name before I do the commit.


Hmm. I'm not sure. You could always lock a file, then unlock it. When you lock, it'll tell you who you are.

However, to stop the current username from being cached (ie stored in your runtime config files/registry) then use the --no-auth-cache option.

If that fails too, then you're probably using svn over ssh, and ssh is providing a username. Fix that and you'll be able to start using your own instead.


Depending on what host OS you're using, configuration information is stored in different places. See the subversion book's section on the topic.

Deleting the auth subdirectory of the config will remove any stored authentication, thus causing Subversion to ask you for more authentication. Other than that, there doesn't seem to be a way to query which user you're authenticated as.


Usually I'm prompted when I try to commit unless I save the authentication information, which means anyone can check out the code but that's just what I've seen in my workplace when it comes to SVN.


"Re: How to change user if 'remember auth' is checked" may be of some help, though if not just provide some more details as generally I'd think others would have had this happen before and know how to deal with this.


Maybe svn auth [username]

svn auth asdsad
svn: E200009: Credentials cache in 'C:\Users\youruser\AppData\Roaming\Subversion' contains no matching credentials

For Help

svn help auth -v
auth: Manage cached authentication credentials.
usage: 1. svn auth [PATTERN ...]
       2. svn auth --remove PATTERN [PATTERN ...]

  With no arguments, list all cached authentication credentials.
  Authentication credentials include usernames, passwords,
  SSL certificates, and SSL client-certificate passphrases.
  If PATTERN is specified, only list credentials with attributes matching one
  or more patterns. With the --remove option, remove cached authentication
  credentials matching one or more patterns.

  If more than one pattern is specified credentials are considered only if they
  match all specified patterns. Patterns are matched case-sensitively and may
  contain glob wildcards:
    ?      matches any single character
    *      matches a sequence of arbitrary characters
    [abc]  matches any of the characters listed inside the brackets
  Note that wildcards will usually need to be quoted or escaped on the
  command line because many command shells will interfere by trying to
  expand them.

Valid options:
  --remove                 : remove matching authentication credentials
  --show-passwords         : show cached passwords

Global options:
  --username ARG           : specify a username ARG
  --password ARG           : specify a password ARG (caution: on many operating
                             systems, other users will be able to see this)
  --password-from-stdin    : read password from stdin
  --no-auth-cache          : do not cache authentication tokens
  --non-interactive        : do no interactive prompting (default is to prompt
                             only if standard input is a terminal device)
  --force-interactive      : do interactive prompting even if standard input
                             is not a terminal device
  --trust-server-cert      : deprecated; same as
                             --trust-server-cert-failures=unknown-ca
  --trust-server-cert-failures ARG : with --non-interactive, accept SSL server
                             certificates with failures; ARG is comma-separated
                             list of 'unknown-ca' (Unknown Authority),
                             'cn-mismatch' (Hostname mismatch), 'expired'
                             (Expired certificate), 'not-yet-valid' (Not yet
                             valid certificate) and 'other' (all other not
                             separately classified certificate errors).
  --config-dir ARG         : read user configuration files from directory ARG
  --config-option ARG      : set user configuration option in the format:
                                 FILE:SECTION:OPTION=[VALUE]
                             For example:
                                 servers:global:http-library=serf
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号