Suddenly, on a single machine, my auth token doesn’t run anymore - github

Suddenly, in the middle of the day, github ceased to work in one of my machines.
I just git push from my development machine, then I write down my userid and paste my personal access token. Done.
Just a few seconds later, I switch to my AWS online server, then I git pull, write down my userid and then pasted (from the same clipboard) my personal access token.
The answer has been
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/pdipietro/kebraServer/'
Now, on that machine (Ubuntu 20.04.3) I cannot do any git operation: the result is always the same as above.
On my development machine, and in other servers, I tried to git push and git pull that project and some others, and everything runs good as always.
I tried also to reboot the machine, without success.
Then, I generate new personal access token to my github, and tried with it, too: the same result.
At the end, I wrote this same post to the github community, but Our automated spam filter, Akismet, has temporarily hidden your post.
Can someone help?

Suddenly, it restart to run correctly.
With no words for github community.
I have no words for this.

Related

Clone Git repository with personal access token

I just created a new Github repository, and as I was about to clone it to start pushing files I realized I no longer managed to pass the authentication step. I have tried pretty much every combination of solutions I could find on the Internet, starting with how I used to do it (git clone https://<PAT>#github.com/<username>/<repo name>), and nothing seems to work. I also tried the <username>:<PAT>#github.com or oauth2:<PAT>#github.com variants among other things. When trying to push, I either end up having to enter a password that's no longer supported and inevitably fails, or I get straight up told my username or password are invalid. I also regenerated the PAT so it's not an expiration issue.
I know this is quite similar to other questions on this site, but none of their answers worked for me. Did Git change their authentication system again recently?

PyCharm GitHub error "git#github.com: Permission Denied (publickey)"

Ok about 2 hours ago I enabled the VCS as GitHub, then went in and did the Oauth (I think its called) where JetBrains opens a browser and asks me to authorize GitHub. Then I clicked admin, create a repo, add comments, add read comments, and other stuff to authorize PyCharm to create a repo and push via the app.
Now I'm still getting errors, it pushed to create a repo... but there is no code inside.
Why isn't this a simple process? I've enabled it, and setup GPG access but it refuses to sync my code.
Now under preferences>version control the directory just shows despite my project having a name and over 500 files.
Under Preferences > Version Control > Github it shows my GitHub icon, I tried login in thru the IntelliJ button and I've synced a token. Neither worked
Pycharm is supposed to be a simple way to learn to develop stuff and be integrated.
What am I missing as I'm authorized on PyCharm Professional as a student.
git#github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I didn't find how to fix this in pyCharm, but it worked for me when I saved my private key (matching the one authorized in GitHub) in my ${HOME}/.ssh/id_rsa.
Hope it helps.

VSTS keeps generating new personal access tokens

Recently I've been getting an email almost exactly every 20 minutes so with the subject "Visual Studio Team Services personal access token added". The content is something like this:
A new personal access token was added to your account
Git: https://[company account].visualstudio.com/ on [USER]
Scopes: vso.code_write vso.packaging
Expiration: 7/4/2019
The regularity makes me think it's something automatic doing it, but I don't know what that could be.
The auto generated PAT description with the format Git: https://[account].visualstudio.com/ on [machine] with the scopes Code (read and write) and Packaging (read) is caused by cloning VSTS git repo.
So please check if someone (or some code execute git clone operation) cloned VSTS git repo(s) on different machnes periodly.
Turns out the tokens were being generated by Atlassian SourceTree. I don't know what was happening or why it suddenly started, but closing SourceTree resulted in no new tokens being issued. Reopening SourceTree led to the tokens being issued again.
I upgraded SourceTree and Git for Windows and rebooted my computer, and that seems to have done the trick. I had already rebooted my computer since the issue started without that solving things, but the combination of rebooting and upgrading both Git and SourceTree seems to have resolved it.

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

failing when trying to push to my remote git repository

i'm new use of VSCode. I'm trying to push my commits to remote repo, i'm getting credentials prompt, but i getting following output:
remote: Anonymous access to myname/myrepo.git denied.
fatal: Authentication failed for 'https://github.com/myname/myrepo.git/'
git fetch
Please help
Thanks
There are many people having this problem. I know it has been reported for a couple of times here: https://code.visualstudio.com/Issues/List
It seems those tickets are not available on public. File a new bug. Hopefully they are going to fix it until the next release.
I just had a problem where I was receiving a similar error, and I found these articles resourceful to fix this issue.
Potential reasons for problem:
Windows Credentials doesn't have the right Github credentials
Adding Git credentials on Windows
Github deprecated password authentication and you now have to use Personal Access Token when pushing
https://techglimpse.com/git-push-github-token-based-passwordless/
Hope this is helpful to anyone else that comes across this post.