Ask Your Question
1

Diagnosing issues with bloom + github two-factor authentication

asked 2016-05-17 08:52:14 -0500

Felix Duvallet gravatar image

updated 2016-05-18 03:34:31 -0500

I am trying to release a package with bloom, but I also have two-factor authentication on my github account.

I tried following these instructions: http://wiki.ros.org/bloom/Tutorials/G...

and have a ~/.config/bloom file with my private github token. However, bloom still fails to authenticate:

==> git push --dry-run
Username for 'https://github.com': felixduvallet
Password for 'https://felixduvallet@github.com': 
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/felixduvallet/grasp-synergy-release.git/'
Cannot push to remote release repository.

Is there a way to diagnose the bloom+github authentication by itself?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
3

answered 2016-05-17 16:19:12 -0500

jbinney gravatar image

The way I get around this is by adding the following to my .gitconfig:

# 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/

Then just make sure that you've added the your ssh key from the computer you are on to your github profile.

edit flag offensive delete link more

Comments

1

Thanks, I'm adding this information to the wiki.

Felix Duvallet gravatar image Felix Duvallet  ( 2016-05-18 01:59:07 -0500 )edit

Awesome, I didn't know that. +1

Martin Günther gravatar image Martin Günther  ( 2016-05-18 02:49:59 -0500 )edit
1

answered 2016-05-18 02:43:36 -0500

updated 2016-05-18 04:28:26 -0500

The solution I'm personally using is to create an OAuth token to use instead of a password, and then use a password manager to store it. The password manager I'm using is pass, along with pass-git-helper. The advantage over using ~/.config/bloom is that it doesn't work only for bloom, but for all git commands (just like @jbinney 's solution). Of course if you're not already using pass anyway, @jbinney 's solution is much easier to set up.

edit flag offensive delete link more

Comments

Sorry, that was a typo on my part. The config file is in fact ~/.config/bloom as per the wiki instructions.

Felix Duvallet gravatar image Felix Duvallet  ( 2016-05-18 03:34:13 -0500 )edit

Ok, I've removed that part from my answer.

Martin Günther gravatar image Martin Günther  ( 2016-05-18 04:28:43 -0500 )edit

Your Answer

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

Add Answer

Question Tools

3 followers

Stats

Asked: 2016-05-17 08:52:14 -0500

Seen: 132 times

Last updated: May 18 '16