Bug 1732964 - `list` works, but `Login invalid/expired` on `build-package`
Summary: `list` works, but `Login invalid/expired` on `build-package`
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Internal Copr
Classification: Internal
Component: backend
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Pavel Raiskup
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-24 20:58 UTC by Vadim Rutkovsky
Modified: 2019-07-25 08:34 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-25 04:28:12 UTC


Attachments (Terms of Use)

Description Vadim Rutkovsky 2019-07-24 20:58:22 UTC
Description of problem:

$ rhcopr --debug whoami
#  Debug log enabled  #
vrutkovs

$ rhcopr --debug list                                        
#  Debug log enabled  #
[22:51:16] {/usr/lib/python3.7/site-packages/urllib3/connectionpool.py:813} DEBUG - Starting new HTTPS connection (1): copr.devel.redhat.com:443
[22:51:18] {/usr/lib/python3.7/site-packages/urllib3/connectionpool.py:393} DEBUG - https://copr.devel.redhat.com:443 "GET /api_3/project/list?ownername=vrutkovs HTTP/1.1" 200 3895
Name: docker-1.10
  Description: 
  Repo(s):
    rhel-7-x86_64: https://coprbe.devel.redhat.com/results/vrutkovs/docker-1.10/rhel-7-x86_64/
.....

$ rhcopr --debug build-package --name ignition vrutkovs/rhcos
#  Debug log enabled  #
[22:53:53] {/usr/lib/python3.7/site-packages/urllib3/connectionpool.py:813} DEBUG - Starting new HTTPS connection (1): copr.devel.redhat.com:443
[22:53:55] {/usr/lib/python3.7/site-packages/urllib3/connectionpool.py:393} DEBUG - https://copr.devel.redhat.com:443 "POST /api_3/package/build HTTP/1.1" 401 131
Login invalid/expired. Please visit https://copr.devel.redhat.com/api to get or renew your API token.

I'm using a `~/.config/rhcopr`, contents is the same as shown on /api page

Version-Release number of selected component (if applicable):
python3-copr-1.94-1.fc30.noarch
copr-cli-1.79-1.fc30.noarch
rhcopr-0-8.fc30.noarch

How reproducible:
Always


Additional info:

Comment 1 Pavel Raiskup 2019-07-25 04:28:12 UTC
Hi Vadim, thanks for the report.  Please regenerate your token, it was only
valid till 2017-10-01 (hit the button on the API page).

Comment 2 Vadim Rutkovsky 2019-07-25 08:34:55 UTC
(In reply to Pavel Raiskup from comment #1)
> Hi Vadim, thanks for the report.  Please regenerate your token, it was only
> valid till 2017-10-01 (hit the button on the API page).

Oh, sorry, dates are hard. Regenerated token and it worked, thanks


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