Bug 700898 - Missing credentials shows misleading error message
Summary: Missing credentials shows misleading error message
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Pradeep Kilambi
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2011-04-29 18:48 UTC by Preethi Thomas
Modified: 2013-09-09 16:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 679443
Environment:
Last Closed: 2011-08-16 12:08:23 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2011-04-29 18:48:28 UTC
+++ This bug was initially created as a clone of Bug #679443 +++
Cloning this bug to address the same issue in pulp-client
[root@preethi 752]# pulp-client consumer create --id=preethi
error: operation failed: Invalid SSL Certificate



Logged out to make sure I didn't have an admin certificate:

$ sudo pulp-admin auth logout
User credentials removed from [/home/jdob/.pulp]


I ran repo list without logging in or passing username/password. That error message is misleading, it should specify that the user is not logged in.

$ sudo pulp-admin repo list
error: operation failed: Invalid SSL Certificate

--- Additional comment from pthomas on 2011-03-21 16:17:42 EDT ---

*** Bug 689554 has been marked as a duplicate of this bug. ***

--- Additional comment from pkilambi on 2011-04-13 15:02:53 EDT ---

commit 4cbeed60aa84fec995428274d7793a3c3888e47b

Added checks to:
 - see if user cert/key exists; 
 - if not; check if --username or --password is provided;
 - else throw a message 


$ sudo pulp-admin repo list
Error: No valid credentials; Please run `pulp-admin auth login` or use `--username` and `--password`

--- Additional comment from jason.dobies on 2011-04-13 15:23:00 EDT ---

Fixed in build 0.163.

--- Additional comment from pkilambi on 2011-04-14 11:35:42 EDT ---

Just note that with this fix, we exposed an issue in pulp-admin auth module:

Here is the bug: https://bugzilla.redhat.com/show_bug.cgi?id=696676

auth module should be using the top level credentials like every other command. Instead of asking for -u/-p again. Util this bug is fixed, you'll need to run auth login as

pulp-admin -u admin -p admin auth login --username admin --password admin

--- Additional comment from pthomas on 2011-04-15 15:49:55 EDT ---

fails_qa

[root@preethi ~]# rpm -q pulp
pulp-0.0.163-1.fc14.noarch
[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]#  pulp-admin auth logout
User credentials removed from [/root/.pulp]

[root@preethi ~]# pulp-admin repo list
error: operation failed: Invalid SSL Certificate

--- Additional comment from pkilambi on 2011-04-15 15:53:02 EDT ---

hrm are you sure you have the right version:

This is on my latest:


$ sudo pulp-admin auth logout
User credentials removed from [/root/.pulp]

$ sudo pulp-admin auth login
Error: No valid credentials; Please run `pulp-admin auth login` or use `--username` and `--password`

--- Additional comment from pthomas on 2011-04-15 16:17:05 EDT ---

I have the correct version which is comment #3

[root@preethi ~]# rpm -qa pulp
pulp-0.0.163-1.fc14.noarch

--- Additional comment from pkilambi on 2011-04-15 16:21:55 EDT ---

looks like this fix hasnt made it into 163 build. Moving to Modified

--- Additional comment from jortel on 2011-04-19 14:49:16 EDT ---

build: 0.168

--- Additional comment from pthomas on 2011-04-19 15:42:22 EDT ---

verified in 168

[root@preethi ~]# pulp-admin repo sync --id =f14
Error: No valid credentials; Please run `pulp-admin auth login` or use `--username` and `--password`

Comment 1 Pradeep Kilambi 2011-04-29 19:38:11 UTC
commit 024e510a25157cf2ec0c4f1a27a7a77e4534ad30

Comment 2 Jeff Ortel 2011-05-04 15:41:51 UTC
build: 0.173

Comment 3 Preethi Thomas 2011-05-04 18:26:52 UTC
verified
[root@pulp-client ~]# rpm -q pulp-client
pulp-client-0.0.173-1.fc14.noarch
[root@pulp-client ~]# pulp-client consumer create
warning: this client is not registered; please register to continue
Error: No valid credentials; Please use `--username` and `--password`

Comment 4 Preethi Thomas 2011-08-16 12:08:23 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 5 Preethi Thomas 2011-08-16 12:21:26 UTC
Closing with Community Release 15

pulp-0.0.223-4.


Note You need to log in before you can comment on or make changes to this bug.