Bug 1620586 - Anonymous ~/.netrc breaks fedpkg request-branch
Summary: Anonymous ~/.netrc breaks fedpkg request-branch
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: fedpkg
Version: 28
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: cqi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-23 08:56 UTC by Jan Kratochvil
Modified: 2019-05-28 22:13 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-05-28 22:13:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
~/.netrc (90 bytes, text/plain)
2018-08-23 08:59 UTC, Jan Kratochvil
no flags Details

Description Jan Kratochvil 2018-08-23 08:56:34 UTC
Description of problem:
https://pagure.io/fedpkg/issue/265

Version-Release number of selected component (if applicable):
fedpkg-1.34-3.fc28.noarch

How reproducible:
Always

Steps to Reproduce:
fedora/libipt/master$ fedpkg request-branch epel7
fedora/libipt/master$ fedpkg request-branch --repo libipt --namespace rpms --no-auto-module epel7

Actual results:
Could not execute request_branch: The following error occurred while creating a new issue in Pagure: Invalid or expired token. Please visit https://pagure.io/settings#api-keys to get or renew your API token.
Could not execute request_branch: The following error occurred while creating a new issue in Pagure: Invalid or expired token. Please visit https://pagure.io/settings#api-keys to get or renew your API token.

Expected results:
https://pagure.io/releng/fedora-scm-requests/issue/42
https://pagure.io/releng/fedora-scm-requests/issue/43

Additional info:
$ cat ~/.config/rpkg/fedpkg.conf
[fedpkg.pagure]
token = XQ...UV

The reason is my ~/.netrc, attached it.

Comment 1 Jan Kratochvil 2018-08-23 08:59:57 UTC
Created attachment 1478113 [details]
~/.netrc

It did not attach for some unknown reason.

Comment 2 cqi 2018-08-23 14:19:36 UTC
I have done some research, after going through requests source code, it looks difficult to solve in fedpkg by overriding or some other hack way. requests defaults to read .netrc if it exists and argument auth is None passed to each request.* method to make a HTTP request. There is already an issue[1] relative to this bug reported in upstream. It would be nice to be solved in requests.

I didn't use .netrc before. I just read its document to learn it today and I think a workaround would be to update .netrc by changing default to specific machine name. This could be inconvenient if multiple machines have to be matched. Could you please have a try with this workaround?

[1] https://github.com/requests/requests/issues/3929

Comment 3 Jan Kratochvil 2018-08-23 14:38:02 UTC
(In reply to cqi from comment #2)
> I didn't use .netrc before. I just read its document to learn it today and I
> think a workaround would be to update .netrc by changing default to specific
> machine name.

That is not possible. The purpose of .netrc is to automatically login anonymously to all other machines which I do not have specific username/password for.

Sure ~/.netrc makes no sense anymore as there are no more FTP servers (and if they are nobody access them by a commandline FTP client anyway); my file is from 2001 in my GIT but it must be much older.


> This could be inconvenient if multiple machines have to be
> matched. Could you please have a try with this workaround?

Which workaround do you mean? ~/.netrc really cannot be changed as it needs to apply to all hosts - for FTP only but the file does not seem to have scheme differentiation.


If it is not overridable at Python level I would find enough to just check if ~/.netrc exists and print a big fat warning or even stop in such case.

Comment 4 Ben Cotton 2019-05-02 21:02:24 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Ben Cotton 2019-05-28 22:13:39 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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