Yes, when I say my 2FA token, I meant my personal access token. I also
tried the Jenkins Credentials first before setting *git config --global
credential.helper wincred.*

On Tue, Sep 20, 2016 at 9:43 PM Baptiste Mathus <m...@batmat.net> wrote:

> +1. It's actually more than recommended, it's compulsory.
> With HTTPS on GitHub in that situation, you must use an access token.
> Using your classical credentials won't work.
> See
> https://help.github.com/articles/which-remote-url-should-i-use/#when-2fa-is-enabled
> (and the link mark already provided indeed).
>
> Le 21 sept. 2016 3:53 AM, "Mark Waite" <mark.earl.wa...@gmail.com> a
> écrit :
>
>> I've never tested the git plugin with wincred, so I don't know if it will
>> work.
>>
>> If it does not work, you may need to remove your stored credentials
>> http://stackoverflow.com/questions/15381198/remove-credentials-from-git and
>> rely on the credentials mechanism inside Jenkins.
>>
>> When you say that you entered your 2FA token, I assume what you really
>> entered was your personal access token
>> <https://help.github.com/articles/creating-an-access-token-for-command-line-use/>
>> rather than the value you enter from your two factor authentication
>> device.  If not, then you should probably generate a personal access token
>> and use that as though it were your password.
>>
>> Mark Waite
>>
>> On Tue, Sep 20, 2016 at 7:26 PM wilson luu <luuwil...@gmail.com> wrote:
>>
>>> I've been stuck on this problem for a couple of days and I cannot find
>>> any resolution to this problem. Some of my colleagues suggest I use SSH to
>>> clone my private repo, but I want to make sure I didn't miss something with
>>> this setup. Hopefully, someone has encountered this issue before and was
>>> able to resolve it.
>>>
>>> Here is some background on my issue:
>>>
>>>    - I'm trying to clone my private Github repo to a Windows 10 Pro
>>>    slave machine and my repo has 2FA enabled.
>>>    - I've stored the 2FA token and the my Git username in Jenkins
>>>    Credential plugin and no errors appear when I select the private repo for
>>>    my SCM with the stored credentials.
>>>    - I am able to manually clone my private repo on the Windows 10 Pro
>>>    slave machine using my token without any issues.
>>>    - I've also set *git config --global credential.helper wincred *on
>>>    the slave machine to store my credentials so Git won't prompt me for my
>>>    password again; still did not resolve the issue.
>>>    - My repo is only 31 KB, so not an issue with the repo size.
>>>    - Using Jenkins build 1.651.2 with Git plugin 2.5.0.
>>>    - Below is the error I'm encountering:
>>>
>>>
>>> Started by user Wilson Luu  <https://jenkins.appcelerator.org/user/wluu>
>>> [EnvInject] - Loading node environment variables.
>>> Building remotely on ENG-TestSlave-Win10Pro 
>>> <https://jenkins.appcelerator.org/computer/ENG-TestSlave-Win10Pro> 
>>> (automation windows) in workspace C:\Jenkins\workspace\library_automation
>>> Cloning the remote Git repository
>>> Cloning repository https://github.com/appcelerator/libautomator.git
>>>  > git init C:\Jenkins\workspace\library_automation # timeout=10
>>> Fetching upstream changes from 
>>> https://github.com/appcelerator/libautomator.git
>>>  > git --version # timeout=10
>>>  > git -c core.askpass=true fetch --tags --progress 
>>> https://github.com/appcelerator/libautomator.git 
>>> +refs/heads/*:refs/remotes/origin/*
>>> ERROR: Timeout after 10 minutesERROR 
>>> <http://stacktrace.jenkins-ci.org/search?query=ERROR>: Error cloning remote 
>>> repo 'origin'hudson.plugins.git.GitException 
>>> <http://stacktrace.jenkins-ci.org/search?query=hudson.plugins.git.GitException>:
>>>  Command "git -c core.askpass=true fetch --tags --progress 
>>> https://github.com/appcelerator/libautomator.git 
>>> +refs/heads/*:refs/remotes/origin/*" returned status code -1:
>>> stdout:
>>> stderr:
>>>     at 
>>> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1719)
>>>     at 
>>> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1463)
>>>     at 
>>> org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:63)
>>>     at 
>>> org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:314)
>>>     at 
>>> org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:506)
>>>     at 
>>> org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
>>>     at 
>>> org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
>>>     at hudson.remoting.UserRequest.perform(UserRequest.java:120)
>>>     at hudson.remoting.UserRequest.perform(UserRequest.java:48)
>>>     at hudson.remoting.Request$2.run(Request.java:332)
>>>     at 
>>> hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
>>>     at java.util.concurrent.FutureTask.run(Unknown Source)
>>>     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>>>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>>>     at hudson.remoting.Engine$1$1.run(Engine.java:85)
>>>     at java.lang.Thread.run(Unknown Source)
>>>     at ......remote call to ENG-TestSlave-Win10Pro(Native Method)
>>>     at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
>>>     at hudson.remoting.UserResponse.retrieve(UserRequest.java:220)
>>>     at hudson.remoting.Channel.call(Channel.java:781)
>>>     at 
>>> org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145)
>>>     at sun.reflect.GeneratedMethodAccessor737.invoke(Unknown Source)
>>>     at 
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>     at java.lang.reflect.Method.invoke(Method.java:606)
>>>     at 
>>> org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131)
>>>     at com.sun.proxy.$Proxy70.execute(Unknown Source)
>>>     at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1039)
>>>     at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1079)
>>>     at hudson.scm.SCM.checkout(SCM.java:485)
>>>     at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
>>>     at 
>>> hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
>>>     at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
>>>     at 
>>> hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
>>>     at hudson.model.Run.execute(Run.java:1738)
>>>     at hudson.matrix.MatrixBuild.run(MatrixBuild.java:301)
>>>     at hudson.model.ResourceController.execute(ResourceController.java:98)
>>>     at hudson.model.Executor.run(Executor.java:410)
>>> ERROR: null
>>> Started calculate disk usage of build
>>> Finished Calculation of disk usage of build in 0 seconds
>>> Started calculate disk usage of workspace
>>> Finished Calculation of disk usage of workspace in  1 second
>>> Finished: FAILURE
>>>
>>>
>>>
>>> --
>>> 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-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/59c164d3-6b39-4d8a-a9ff-e8a41eda21fb%40googlegroups.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/59c164d3-6b39-4d8a-a9ff-e8a41eda21fb%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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-users+unsubscr...@googlegroups.com.
>>
> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtEA8%3D5Dg7Q%3DwrVohNnFZvxYduvvxoQp%3DOWsaJULg640Nw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtEA8%3D5Dg7Q%3DwrVohNnFZvxYduvvxoQp%3DOWsaJULg640Nw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-users/AQMk-ZU8vS8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS4%2Bwx6dS0LLU1OoL4QUMcHK51eYYuDfnhM%3DB0k299jYWA%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS4%2Bwx6dS0LLU1OoL4QUMcHK51eYYuDfnhM%3DB0k299jYWA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CADOtEsBSo5zbFzPYSZ%2BZE791JgxntN5UN3Tpo%3D9KFA6LG1N1pA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to