GitHub 2 Factor Authentication With Jenkins

1,231 views
Skip to first unread message

prakash damodaran

unread,
Dec 15, 2016, 9:42:46 AM12/15/16
to Jenkins Users
Hi,

I am facing authentication issue with GitHub and Jenkins. We have setup a 2 factor authentication in GITHUB, So I am facing issue on setting up authentication with it. Any leads on it would be great!

Current I am getting the below error when I provide the username and Password of GitHub. Is there anything else I need to take care of.

stderr: github --credentials get: github: command not found
github --credentials erase: github: command not found
remote: Invalid username or password.
fatal: Authentication failed for "Github repository URL"

Thanks,
Prakash


Littlefield, Tyler

unread,
Dec 15, 2016, 10:41:14 AM12/15/16
to jenkins...@googlegroups.com
Hello,
You'll need to install the github package. They offer their own cli
service. This will require googling to figure out how to get it for your
specific platform.
Also note that 2fa authentication is not going to make your jenkins jobs
any easier and there's not really a workaround to 2fa. You'll have to
accept the authentication each time Jenkins tries to authenticate. There
may be workarounds, but it's going to get messy.

>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jenkinsci-use...@googlegroups.com
> <mailto:jenkinsci-use...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/0831d947-931a-4608-acd3-36dff4217fee%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/0831d947-931a-4608-acd3-36dff4217fee%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.


--
Take care,
Ty
Twitter: @sorressean
Web: https://tysdomain.com
Pubkey: https://tysdomain.com/files/pubkey.asc

prakash damodaran

unread,
Dec 15, 2016, 11:09:44 AM12/15/16
to Jenkins Users, ty...@tysdomain.com
Hi Ty,

I have already installed the GitHub package in my system. I am trying to figure out is there any way we can work with 2FA. Just FYI... I just came across generating a public access token in GitHub and using it Jenkins but that didn't actually work still looking if I have missed anything else. If you have any information about it would be great help!

Thanks,
Prakash

Littlefield, Tyler

unread,
Dec 15, 2016, 11:30:19 AM12/15/16
to jenkins...@googlegroups.com
On 12/15/2016 11:09 AM, prakash damodaran wrote:
> Hi Ty,
>
> I have already installed the GitHub package in my system. I am trying to
> figure out is there any way we can work with 2FA. Just FYI... I just
> came across generating a public access token in GitHub and using it
> Jenkins but that didn't actually work still looking if I have missed
> anything else. If you have any information about it would be great help!
>
> Thanks,

Your error suggests that you have not installed github because it's
erroring that it can't find the command. insure that github is in the
path. I can't offer much on 2fa with jenkins, but I can help with that
issue at least. from there you can see what Jenkins returns with the
github package already installed and in the path. If you're on windows,
the solution is as simple as adding the directory to the path env variable.
> > an email to jenkinsci-use...@googlegroups.com <javascript:>
> > <mailto:jenkinsci-use...@googlegroups.com <javascript:>>.
> <https://groups.google.com/d/msgid/jenkinsci-users/0831d947-931a-4608-acd3-36dff4217fee%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/optout>.
>
>
> --
> Take care,
> Ty
> Twitter: @sorressean
> Web: https://tysdomain.com
> Pubkey: https://tysdomain.com/files/pubkey.asc
> <https://tysdomain.com/files/pubkey.asc>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jenkinsci-use...@googlegroups.com
> <mailto:jenkinsci-use...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/c5029fb3-daa6-4231-b953-129dfbb378d4%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/c5029fb3-daa6-4231-b953-129dfbb378d4%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages