GitHub can't connect to IntelliJ after updating to 2017.3.3 - github

I've just tried to update my IntelliJ to version 2017.3.3 and I can no longer fetch or pull into my GitHub repos. It will first prompt me with this screen:
Then, I will correctly enter my credentials, after which it will prompt me with this one:
And then it will go back and forth between those two, with me correctly entering my credentials, until finally it alerts me with:
I've checked through a browser, I'm able to log in and out of Git with the credentials I'm using in Intellij. I've also checked in IntelliJ File | Settings | Version Control | GitHub and running a test, having it prompt me for the two factor authentication. That returns a success from IntelliJ. Any idea on what's going on? Thanks!

https://github.com/Microsoft/Git-Credential-Manager-for-Windows
"NOTICE: Experiencing GitHub push/fetch problems?
As of 22 Feb 2018, GitHub has disabled support for weak encryption which means many users will suddenly find themselves unable to authenticate using a Git for Windows which (impacts versions older than v2.16.0). DO NOT PANIC, there's a fix. Update Git for Windows to the latest (or at least v2.16.0)."
You need to update the Git Credentials Manager and possibly Git itself.

Looks like the second prompt is issued by the credential-helper configured in the git client itself. Does git fetch work from the command line?
I would recommend unsetting all gi credential helpers and let IntelliJ manage your passwords. See e.g. this thread to unset them

Related

Authentication failed - Cannot clone remote repository by Git (Only occurred in Eclipse)

I am on Eclipse 2018.12 (actually same issue occurs from other version like Mars2 or Scala-IDE 4.7), I am struggling to get Git/EGit pass authentication while cloning remote repository, which is deployed on my company's server.
The same issue never occur while I am using Git command like or Git GUI or IntelliJ, but only by Eclipse (regardless of Eclipse version or any type of Git plugin)
I think the difference here is from Git bash or Git GUI or IntelliJ, the authentication is implicitly by verifying my Windows credential from local OS credential store with remote server. So Git bash/GUI and IntelliJ never pop up the login screen.
However, the default setup page from Eclipse asks for username/password every time. And after I enter the correct information, the same pop up message just show up again and again, like a sign that the authentication never pass.
Please see screenshot below.
Is there anyway to let Eclipse to follow the same way of authentication like Git
Same issue here. Seems that eGit doesn't support Windows Authentication where as command line Git does.
Work around is to use a Personal Access Token as the password and anything as the username.
You can create a PAT by logging into your TFS/Azure DevOps Website, click on your profile icon at the top right, select Security. Then create a new Personal Access Token and copy the token into the password box in eclipse. Maximum life of a token is 1 year, so you'll need to make a new one every year.

Can't login to GitHub from SourceTree anymore

I was able to login up until today when it just stopped working. I'm using a Windows 7 machine. I have 2-factor authentication.
I've tried personal access tokens. I've tried deleting my credentials and re-adding them. I've tried nuking and/or updating credentials in Windows Credentials Manager. I've tried OATH vs Basic authentication. No luck. It just keeps asking me for "Username or email" and "password".
I've tried changing my GitHub password. I've tried authenticating with OAuth (SourceTree says it's connected, but then I get the login screen again).
Can anybody out there give me a list of steps to get back into our repo from SourceTree? I'm blocked now and unable to do work until I get this fixed.
Your git is out of date. You need to update your system git and then switch ST to use that. I think ST's embedded git needs to update the latest git version available on their server (complete guess). In the meantime, this works for me.
If you set Two-factor authentication in your Github, then just modify below in your SourceTree preferences.
Step 1: Change Auth Type to Basic
Step 2: Set Password as Access token
https://github.com/Microsoft/Git-Credential-Manager-for-Windows
"NOTICE: Experiencing GitHub push/fetch problems? As of 22 Feb 2018, GitHub has disabled support for weak encryption which means many users will suddenly find themselves unable to authenticate using a Git for Windows which (impacts versions older than v2.16.0). DO NOT PANIC, there's a fix. Update Git for Windows to the latest (or at least v2.16.0)."
I fixed it by updating both the Git Credentials Manager and Git itself.
I got this sorted today. My steps were as follows:
shutdown SourceTree
deleted everything in the Windows section under Credentials Manager
installed the latest version of GIT from Git Hub
start SourceTree. Deleted all the entries under Tools -> Options -> Authentication
Add a new GitHub hosting service using HTTPS & OAuth. Click 'Refresh OAuth Token’ and all was well.
SourceTree now functions normally for me.
Good luck and I hope this helps someone out there :)
I faced the same issue today, changing the Git version in Tools > Options > Git to use System Git instead of Embedded git resolved it for me. I had installed Git for Windows earlier in the day to continue with my work. So it must have used the Git installed then.
This might be the cause: https://githubengineering.com/crypto-removal-notice/
Last year we announced the deprecation of several weak cryptographic
standards. Then we provided a status update toward the end of last
year outlining some changes we’d made to make the transition easier
for clients. We quickly approached the February 1, 2018 cutoff date we
mentioned in previous posts and, as a result, pushed back our schedule
by one week. On February 8, 2018 we’ll start disabling the following:
TLSv1/TLSv1.1: This applies to all HTTPS connections, including web,
API, and git connections to https://github.com and
https://api.github.com. diffie-hellman-group1-sha1: This applies to
all SSH connections to github.com diffie-hellman-group14-sha1: This
applies to all SSH connections to github.com We’ll disable the
algorithms in two stages:
February 8, 2018 19:00 UTC (11:00 am PST): Disable deprecated algorithms for one hour
February 22, 2018 19:00 UTC (11:00 am PST): Permanently disable deprecated algorithms
The only thing that worked for me was navigating to
C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree
and removing the passwd file.
Once this file is removed, restart SourceTree and execute a fetch or something else that requires access to the repo in question. SourceTree will then prompt you for your password, rewriting the cached credentials.
https://community.atlassian.com/t5/Sourcetree-questions/How-to-update-HTTP-S-credentials-in-sourcetree/qaq-p/297564
(Sourcetree for Mac here)
After I've moved to 2fa on Github, I started having problems with Sourcetree, I've tried using system git but didn't work.
What worked was to change Auth type from basic to OAuth and reconnect account.
All I had to do was click 'Refresh OAuth Token' for my account in Tools -> Options -> Authentication.
I finally got mine working again. These are the steps I took.
In tools > options > authentication I deleted all the github authentication options and then re-added/authenticated again.
I then went to tools > options > git and updated the embedded git (I ended up installing the latest git for windows and using the system editor but I don't think that was the issue)
I then go back to authentication and chose "set default" on my github account which creates a "Rest saved passwords" item. In fact I had to click "set default" twice before it started working.
Testing after every step and trying to close down and open the app and after step 3 it started working. I am not sure if all steps were required but would recommend doing them all anyway as past times I've had this issue step 1 or 2 resolved it.
Ok, I don't have a complete answer, but I did get it working. The process was labyrinthine but mostly, it hinged upon #BillyTom's comment above about the phasing out of TLS 1.1.
This led me to the links I posted in reply to his comments, which got my git bash working again. SourceTree was still failing, however.
The final piece of the puzzle was finding Pageant running in my icons tray (why there?) and manually add the ssh key.
Now it's working.
I'm still a little perplexed by what all these steps are doing. I guess I need to bone up on security protocols.
Thanks, everybody, for all your help. I think I'm up and running again!
In addition to some of the answers above, this may be helpful (it's how I finally got it working)
I made sure had the latest version of Sourcetree
I upgraded to the latest version of and used System Git (Tools -> Options -> Git)
Upgraded to the latest Git Credential Manager for Windows (this was via an installer I downloaded and double-clicked, very easy)
Ensured I was using OAuth for my GitHub account stored in Tools -> Options -> Authentication
Made sure I checked off the box "Allow Sourcetree to manage my credentials using the Git Credential Manager" (this was important!!) on Tools -> Options -> Git
Then when I triggered the GitHub dialog (via pushing a new branch, just an example), I logged in there (this is where it used to fail).
I next got the 2 factor auth dialog, and the code was sent to my phone as expected. I was able to enter the code from my phone into this dialog.
I was getting
"Could not authorize request with the available token. Please re-authenticate."
on MacOS
..System restart solved this issue.
Oct 20th 2021, try updating the version of GIT Bash. I am guessing that a change in SourceTree or Github requires a change the GIT Bash client. I am moving from 2.27.? to 2.33.1

Eclipse Git (Egit) not accepting remote username and password

Why doesn't Egit accept username and password when fetching from remote?
These are the steps I follow:
In Git Repositories view I expand Project -> Remotes -> origin
Right click on origin -> fetch
Login mask appears; I insert User and Password
Repeat step 3 other two times
An error message appears: https://companyname.visualstudio.com/.../projectname: not authorized
Credentials are correct and I am authorized because I use them daily with any kind of git interface: TortoiseGit, SmartGit, Git Bash, ...
I did research but didn't find this problem. Also similar questions don't address this problem.
Update: I used a workaround following this guide. I created an access token from the Visual Studio Team Services account and I'm using that as password.
My git installation is using Git Credential Manager (GitHub page, Microsoft guide to GCM) to store credentials, in fact when I ran for the first time git through the interfaces I mentioned above and tried to connect to the Team Services Git repository the Microsoft Account login window popped up and that was it. Also I can tell it from runnig the command git config --list and getting credential.helper=manager.
Eclipse has the Team Explorer Everywhere plug-in installed, so it should interact with Git Credential Manager and accept the Microsoft Account credentials, but it doesn't. So this is still an open issue.
I was facing the same issue
From git side
settings-->developer settings-->Personal access tokens-->generate new token-->copy that token and use that token as password.
The way to fix this is to go to
Window->Preferences->Team->Git
And then change the HTTP client from Apache HTTP to Java Built-in HTTP
The Git clients you mention uses "native" git, and the credentials are provided transparently during the communication with the server.
Eclipse git client (jgit+egit) is full-java based, and unfortunately you can't use native git in Eclipse.
Either your Git server has user+password locally (not so enterprise-ish!) or you could use Kerberos tickets in Eclipse git; but before you run Eclipse you should do a kinit to create a ticket with your user logon, that is accessible from java process. (Normally the ticket is in your user home directory)
Example using kinit:
I m not so sure about the TFS plugin, but maybe in your case it is worth to install it and see if it helps you instead of the embedded egit, see https://msdn.microsoft.com/en-us/library/hh301122(v=vs.120).aspx
I had the same issue, not able to update the username in eclipse pop up while pushing to Git. Irrespective of username, I have provided the generated git credentials password and it worked.
Use personal access token for https. Fine graned tokens are preferred.
Refer. https://cse132.engineering.wustl.edu/files/githubEclipseAuth/githubEclipseAuth.html

Can't commit with Github Windows, no reason given

I have been forced to use other apps, and the command line since Github for Windows is not allowing me to commit changes. I would like to understand what's the problem, but I simply get a prompt with this message:
Commit failed
Failed to create new commit
Then, it gives me the option of go to the Git Shell or to cancel. While I am not an expert with the terminal, I am able to make commits when I choose to go to the Git Shell (or to any other application for that matter).
I am using Github 2.0.5 on Windows 7.
After an exchange with the Github for Windows developers, the issue has something to do with Windows inability to work with paths when they're too long. The node_modules folders generated by Node.js is the culprit of this issue in my particular case.
However, the node_modules folders in my repository are gitignored. The fact that even when gitignored they create a problem in Github for Windows means the developers have to address the situation.
I expect a response or a patch from the developers soon. They have been very helpful. In the meantime, I am using SourceTree as my Windows Git GUI.

GitHub 'your credentials may be out of date' can't clone

I have tried logging out and in, changing password and non work.
I also downloaded the project as zip and put it in the folder. But I can't 'find' it on github client for windows and I cannot clone it then it tells me the project already exist. But I can't open the repository on github for windows. I have deleted Github for windows and re-installed it. I've removed the SSH on github.com so it would make new keys. None work. Any suggestions?
I am getting this error:
http://snag.gy/eHlqj.jpg
So no specific reason at all but;
It was almost 5 months that I was part of this private project. 5 of us are committing almost every day for the past 5 months. Only I had this problem so far.
What helped:
Uninstall github
use something like ccleaner to clean your pc and registry
remove %AppData%\GitHub manually
remove %LocalAppData%\GitHub manually
restart
go to www.github.com in your account and remove the SSH key's.
install github client and login
done, it should work now
It seems that this is a problem of web credentials, have you tried with another browser? or to clear the cache of Chrome?