Opened 3 years ago

Closed 3 years ago

Last modified 3 months ago

#1968 closed help (fixed)

mosrs-cache-password fails despite correct password

Reported by: s1460462 Owned by: ros
Component: MOSRS Keywords: mosrs, monsoon
Cc: Platform: MONSooN
UM Version:

Description

I'm having problems accessing the MOSRS from MONSooN. It appears to fail at the svn step:

[jayat@exvmsrose:~]$ mosrs-cache-password 
Met Office Science Repository Service password: 
svn: E215004: Authentication failed and interactive prompting is disabled; see the --force-interactive option
svn: E215004: Unable to connect to a repository at URL 'https://code.metoffice.gov.uk/svn/test'
svn: E215004: No more credentials or we tried too many times.
Authentication failed
Error: Unable to access Subversion with given password
Run "mosrs-cache-password" to try caching your password again

If I run the same command with --force-interactive, it works fine:

[jayat@exvmsrose:~]$ tail `which mosrs-cache-password`
# Check access is working 
svn info --non-interactive https://code.metoffice.gov.uk/svn/test >/dev/null
[[ $? == 0 ]] || error "Unable to access Subversion with given password"
echo "Subversion password cached"
rosie hello --prefix=u
[[ $? == 0 ]] || error "Unable to access Rosie with given password"
echo "Rosie password cached"

[jayat@exvmsrose:~]$ svn info --force-interactive https://code.metoffice.gov.uk/svn/test
Authentication realm: <https://code.metoffice.gov.uk:443> Met Office Code
Password for 'jackyates': 

Path: test
URL: https://code.metoffice.gov.uk/svn/test
Relative URL: ^/
Repository Root: https://code.metoffice.gov.uk/svn/test
Repository UUID: a22d25f5-0c8c-4ef1-8e68-8aa24666279f
Revision: 123
Node Kind: directory
Last Changed Author: oscarmartinezalvarado
Last Changed Rev: 123
Last Changed Date: 2016-07-28 13:40:09 +0000 (Thu, 28 Jul 2016)

If I try the second step:

[jayat@exvmsrose:~]$ rosie hello --prefix=u
[FAIL] Cannot retrieve username/password: gpg-agent: ERR 67108875 Bad passphrase <GPG Agent> 

It fails here but prompts me for a password, which it accepts:

https://code.metoffice.gov.uk/rosie/u/hello: Hello jackyates

I'm fairly sure I'll just have to refresh some sort of cached value, but I can't figure out how to do that.

(Note: sorry if I've posted this in the wrong place; please redirect me if that's the case.)

Change History (5)

comment:1 Changed 3 years ago by ros

  • Owner changed from um_support to ros
  • Status changed from new to accepted

Hi Jack,

Could you please try deleting the authorisation file for code.metoffice.gov.uk. To do this:

exvmsrose$ cd ~/.subversion/auth/svn.simple
exvmsrose$ grep code.metoffice *

The grep command should return the name of the file that contains your setup for MOSRS. You'll get something like:

2be6a67d04b1c8c6d879daafa52fd762:<https://code.metoffice.gov.uk:443> Met Office Code

Delete the file (2be6a67d04b1c8c6d879daafa52fd762 in my case above) and try running mosrs-cache-password again.

Regards,
Ros.

comment:2 Changed 3 years ago by s1460462

That didn't work unfortunately, but I think I've fixed the problem. I use randomly generated passwords and it seems that mosrs-cache-password fails when I have a # character in the password. On the password change form (https://code.metoffice.gov.uk/cc/sservice/pwdchange) a password with a # is accepted. Perhaps a bug in the mosrs-cache-password script?

Last edited 3 years ago by s1460462 (previous) (diff)

comment:3 Changed 3 years ago by ros

Hi Jack,

Glad you managed to figure it out. If I recall correctly some special characters like # and I think ^ cause problems with caching passwords for subversion/gpg-agent. So I think a problem with the underlying software and not the mosrs-cache-password script. I'll make a note to confirm this and get the MOSRS notes updated with any new advice accordingly.

Regards,
Ros.

comment:4 Changed 3 years ago by ros

  • Resolution set to fixed
  • Status changed from accepted to closed
  • UM Version <select version> deleted

comment:5 Changed 3 months ago by cduranrojas

It was reported that % in the password is causing the following error

Met Office Science Repository Service password:  
Subversion password cached
Username for 'u' - 'https://code.metoffice.gov.uk/rosie/u/': username-given-correctly
[WARN] https://code.metoffice.gov.uk/rosie/u/hello: {}: 401
hello: {}
Error: Unable to access Rosie with given password
Run "mosrs-cache-password" to try caching your password again 
Last edited 3 months ago by cduranrojas (previous) (diff)
Note: See TracTickets for help on using tickets.