Bug 1732964

Summary: `list` works, but `Login invalid/expired` on `build-package`
Product: [Internal] Red Hat Internal Copr Reporter: Vadim Rutkovsky <vrutkovs>
Component: backendAssignee: Pavel Raiskup <praiskup>
Status: CLOSED NOTABUG QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecified   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-25 04:28:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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