ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
0

bloom-release fais: Aborting pull request: HTTP Error 401: Unauthorized

asked 2021-02-15 13:57:15 -0600

130s gravatar image

updated 2021-02-15 14:04:31 -0600

I've been seeing this for a few years IIRC and finally feeling like resolving.

bloom-release seems to be working fine except that it fails to open a PR on rosdistro github repo.

$ bloom-release --rosdistro melodic --track melodic scan_tools --edit
:
==> Checking on GitHub for a fork to make the pull request from...
Could not find a fork of ros/rosdistro on the 130s GitHub account.
Would you like to create one now?
Continue [Y/n]? 
Aborting pull request: HTTP Error 401: Unauthorized (https://api.github.com/repos/ros/rosdistro/forks)
The release of your packages was successful, but the pull request failed.
Please manually open a pull request by editing the file here: 'https://raw.githubusercontent.com/ros/rosdistro/master/melodic/distribution.yaml'
<== No pull request opened.

No idea what's wrong, nor what to look (other than looking into bloom's code, which I don't mind doing)

$ apt-cache policy python3-bloom
python3-bloom:
  Installed: 0.10.1-100
  Candidate: 0.10.1-100
  Version table:
 *** 0.10.1-100 500
        500 http://packages.ros.org/ros/ubuntu focal/main amd64 Packages
        500 http://packages.ros.org/ros/ubuntu focal/main i386 Packages

Part of my git config:

$ more ~/.gitconfig 
[core]
        editor = emacs -nw
[credential]
        helper = cache --timeout=14400
# Enforce SSH
##[url "ssh://git@github.com/"]
##  insteadOf = https://github.com/
# Always use ssh for github, even if the remote URL uses https or git
[url "git@github.com:"]
        insteadOf = git://github.com/
[url "git@github.com:"]
        insteadOf = https://github.com/
[fetch]
        prune = true
[url "git@gitlab.com:"]
        insteadOf = https://gitlab.com/

Another example (ros-drivers/rgbd_launch#48)

edit retag flag offensive close merge delete

Comments

1
gvdhoorn gravatar image gvdhoorn  ( 2021-02-15 14:19:14 -0600 )edit

Do you have 2-factor authentication enabled on your account?

clalancette gravatar image clalancette  ( 2021-02-23 14:43:02 -0600 )edit

Yes > MFA,

130s gravatar image 130s  ( 2021-02-24 04:58:09 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2021-02-24 07:51:13 -0600

clalancette gravatar image

For MFA, you have to setup bloom with an oauth token: http://wiki.ros.org/bloom/Tutorials/G... . In short, besides the URL rewrites, you also need to add a file ~/.config/bloom that contains something like:

{"github_user": <your-user>, "oauth_token": <your-token>}

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2021-02-15 13:57:15 -0600

Seen: 199 times

Last updated: Feb 15 '21