Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XnatCheckLogin gives poor error when .netrc has wrong permissions #392

Closed
duettwe opened this issue Jul 11, 2022 · 3 comments
Closed

XnatCheckLogin gives poor error when .netrc has wrong permissions #392

duettwe opened this issue Jul 11, 2022 · 3 comments
Assignees

Comments

@duettwe
Copy link
Contributor

duettwe commented Jul 11, 2022

When running XnatCheckLogin, we can get something like this:

$ XnatCheckLogin
================================================================
Checking your settings for XNAT
No host specified, using XNAT_HOST environment variable.
Checking login for host=http://129.59.135.143:8080/xnat
ERROR:login not found, set in ~/.netrc
================================================================

The issue in this situation is that the .netrc file was GLOBAL readable, which was fixed with

chmod go-r .netrc

I guess my real question; Is it possible to have a more refined error message?

@baxpr
Copy link
Member

baxpr commented Jul 11, 2022

We got a sensible error message from the netrc library with Xnatinfo. Maybe use the netrc library in XnatCheckLogin as well? Or use it in similar way?

@baxpr
Copy link
Member

baxpr commented Jul 11, 2022

Or don't trap the exception - that might be why we didn't see the same error message

@baxpr
Copy link
Member

baxpr commented May 15, 2024

duplicate #439

@baxpr baxpr closed this as completed May 15, 2024
@baxpr baxpr closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants