I have 2 factor auth enabled for github and after updating to latest version of Carthage i'm getting this error, is there a way to pass the auth code with carthage update/bootstrap commands. I'd prefer to not have to disable 2 factor auth.
You should be able to authenticate with an access token from the command line or set the GITHUB_ACCESS_TOKEN environment variable.
If you can clone from GitHub using git on the command-line without additional authentication, then Carthage should just pick it up. It's definitely possible to use Carthage and have 2FA turned on.
@mdiep ya I can clone and do whatever I need from the command-line, are you saying i shouldn't have to add the access token?
I can clone and do whatever I need from the command-line, are you saying i shouldn't have to add the access token?
Are you cloning over HTTPS or SSH? I should have specified that it would need to be over HTTPS.
ah i see, ya i'm doing everything over ssh, so sounds like I do need to add the auth token
got it working, thanks so much for your help @mdiep
Hey @mdiep , this may be a silly question, but I've been struggling for a bit now:
How do I add the GITHUB_ACCESS_TOKEN environment variable on my machine after generating it on github?
That depends on a lot on the specifics of your machine and how it's set up. It's not something I can help with. Sorry.
Got it figured out. Just needed to add it to my .bashrc
The term "environment variable" was a bit ambiguous for me until I saw the Git doc for Environment Variables which says "Git always runs inside a bash shell"
Thanks again, and sorry for bothering
The above is an excellent solution and just incase someone else comes across this, make sure your credentials are not cached in your keychain, they seem to be used instead of the env. variable.
Adding the token to your bash and then removing any cached credentials may be necessary:
https://help.github.com/articles/updating-credentials-from-the-osx-keychain/
Most helpful comment
Got it figured out. Just needed to add it to my .bashrc
The term "environment variable" was a bit ambiguous for me until I saw the Git doc for Environment Variables which says "Git always runs inside a
bashshell"Thanks again, and sorry for bothering