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

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?

Related

SmartGit removes(from rep.panel) my github's cloned repos

Still in local repos folder they appear to be.
What I have: Ubuntu 18.04, attached bitbacket repos(they appear every run of SmartGit)
What I did: Added gpg key to SmartGit, successfully attached log/pass of GitHub to SmartGit. Same mail on SmartGit and GitHub.
Everything works just fine, until I close app and reboot Linux. Then they're gone.
I don't know what to do to solve this problem, I've tried to google it, but nothing any helpful.
SmartGit is somewhat sensitive to ungraceful shutdowns which typically occur when rebooting your machine without having exited SmartGit before. To solve this, readd the repository to SmartGit's known repositories list using Repository|Add or Create, then exit SmartGit using Repository|Exit and restart.

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

Laravel Forge Github Repository Error

I am trying to connect my Laravel Forge (digitalocean) server to my Github repo like I've done many times in the past, however, this time it is giving an error saying
You must specify a repository to clone.
However, when I go into the command line and do a git clone of the branch and repository, it works fine. Any ideas what might cause this? I have my SSH key for Forge added to Github already.
Thanks,
I ended up deleting the site on forge and reinstalling and it works now. Not sure exactly why it wasn't recognizing the repository, but it works now.

Issue with SourceTree while cloning a GitHub repository

I know that similar questions have already been posted here. However, I think my scenario is a bit different. Here is what I have.
I downloaded and installed the latest official version of the SourceTree software. Also, I have a GitHub account with permissions to clone and push the repository. In order to manage a local copy, I need to clone the online version. Here are the steps that I take:
Start the SourceTree and navigate to File -> Clone / New ...
In the opened window I paste the HTTPS clone URL. I copied it from the browser after I logged in to my GitHub account so the link is correct.
The nest step is to specify a local folder where the repository will be copied. However, when I click to enter Destination Path, the window shows an error:
This is not a valid source path / URL
Clicking the error may give the following details:
remote: Repository not found.
fatal: repository 'https://github.com/org/repo.git/' not found
remote: Repository not found.
fatal: repository 'https://github.com/org/repo.git/' not found
Or the details may be empty. SourceTree does not tell me the reason for the error or anything else.
I tried to re-install SourceTree but the error still exists. I asked the Administration of the GitHub repository for any other permissions but my account has all of them. I am able to push changes to the online repository using the Terminal console but I would like to use a UI (that SourceTree provides) to manage and compare changes in the code.
One think I did not try is to clone the repository using another GtHub account. However, I don't want to do that because I need to commit any changes to the repository on my behalf.
Does anybody know how can this error be fixed or worked around?
I was facing the same issue in Sourcetree for macOS:
This is not a valid source path / URL
The following solution worked for me:
Sourcetree > Preferences > Advanced
Remove the Host name
Clone the project again in Sourcetree
A prompt will pop up; enter your git credentials.
That's it, it resolved my issue.
Lastly on Mac I went to
Sourcetree->Preferences->Git->Git version->Use System Git
and it works... puf!
The exact error message is (as illustrated here):
This is not a valid source path / URL
Possible cause:
proxy settings (as in this thread)
setup steps, with Git disabled (as in here)
When SourceTree started for the first time, I skipped setting up Git & Mercurial in the wizard. Then I reran the wizard and chose to download and install the embedded packages.
But it seems installing those didn't actually enable them - in the Tools -> Options dialogue they were both disabled!
Enabling Mercurial (or Git in your case) allowed the clone dialogue to correctly identify the repo.
credential issues (as in here, from my old answwer)
So I'm here in 2021. Previous answers didn't work for me. There is an issue with a SourceTree (to be honest a lot of issues actually) and as a workaround you can use a token as a password to connect to GitHub.
Use this url to create it: https://github.com/settings/tokens
I hope it helps! 🙂
I was facing the same issue with windows 10 and source tree. After bit research following solution worked for me.
I needed to download or enable the git support in source tree.
Steps
1) Go to Tools -> Options -> Git -> Enable git support
That's it it resolved my issue. Happy coding :)
I was facing the same issue in mac. The following solution worked for me :
Generate personal access token in Github using the following steps :
Login to Github account -> Settings -> Developer Settings -> Personal
access tokens -> Generate new token -> Enter token name -> Generate
token
Sourcetree > Preferences > Advanced
Remove the Host name
Clone the project again in Sourcetree
A prompt will pop up; enter your git credentials. (enter username and in
password enter newly generated access token)
After following this steps, Clone option will get enabled
May I also just add that I resolved this issue by installing Git through SourceTree from [SourceTree]>Tools>Options>Git.
As I'd been using mercurial exclusively on that system till then it had never been installed, and so was presenting the above described error when trying to clone.
Hopefully this helps someone with the same issue! If not, good luck!
I was facing the same issue with windows 10 and source tree. After bit research following solution worked for me. I needed to download or enable the git support in source tree.
Steps 1) Go to Tools -> Options -> Git -> Enable git support
That's it it resolved my issue. Happy coding :)
Even tried all the options above, It quite dint work for me.
I disable the option of ssl certificate
steps :
Go to Tools -> Options -> Git. check the box of "Disable SSL certificate validation"
It worked for me.
Open source tree Tools -> Options -> Git -> Update Embedded. While updating it will ask your gitlab account for linking. After that restart your system.
Adding my scenario and solution:
I have two factor authentication turned on. I couldn't see some private repositories, and couldn't clone from URL. The error I saw was:
remote: Repository not found.
fatal: repository 'https://github.com/bizzabo/web-common.git/' not found
remote: Repository not found.
fatal: repository 'https://github.com/bizzabo/web-common.git/' not found
Supposedly newer versions of SourceTree don't need a personal access token because they can authenticate directly with github, but I couldn't get this to work.
Apparently OAuth and 2FA don't mix well together -- so I changed the authentication method from oauth to basic and used the access token I generated. That did it.
Just in case someone who has multiple git accounts connected and faces this issue, I solved it by going to Tools > Options > Authentication and marking the account which has access to the repo you are trying to clone as default.
Install git to your system by browser and then go to the source tree, click on
Tools -> Options -> Git
then scroll down and click on system.
It works for me, I hope for you too.
I had to uninstall and reinstall SourceTree before it would work. I think my antivirus (Comodo ) was blocking/sandboxing some stuff on the initial install so I disabled it for the reinstall.
I had also same issue This is not a valid source path / URL and it got resolved by updating the Embedded Git of Source Tree.
This issue also manifested itself where I couldn't push or pull from previously cloned and working repositories in source tree. I complained about authentication username and password but clearly that was not the case.
Steps to resolve:
Open source tree, Tools -> Options -> Click on Git Tab -> Update Embedded Git.
I had the same problem. My resolution was to commit an initial file into the repo. After that, I could clone the repo to my desktop.
options -->Tools--->disable ssh worked for me in Mac
The issue might be because of SourceTree didn't have all private access from Github
I have answered here please check to avoid the duplicate answer posting reference link
https://stackoverflow.com/a/62145210/4328589
If you are using Mac and there is Keychain access handling all your authentication, then delete the entry for stash/git url. Now try to checkout in sourcetree and it will ask to enter the password again.
That will solve your problem.
I face this issue on Windows 11 and following are the steps worked for me :
Click on Open with GitHub Desktop option [Refer below image]
Download & install
Launch and click on Open in browser with Github.com
Enter your credentials & validate
Now, Open SourceTree
Click on Tools > Options > Authentication
You will see your Git credentials were successfully added in SourceTree & you can proceed with any option like clone repo etc
I was trying to clone a project from gitlab. However, I have cloned gitlab projects earlier with an account/user credentials which is different from the new account I want to use. In this case, I had deleted the credentials for the old account and then I was able to clone the project by entering credentials for the new gitlab account. To delete the account on MAC go to Preferences > Advanced > Select the account to remove > Click remove.
In my case i was doing new Mac book setup.
Without installing Xcode i was trying to clone branch using SourceTree.
After Xcode installation done, branch cloned successfully.
SourceTree asked for system password for cloning.
I'm posting another possible solution, as I just helped a colleague who couldn't clone a private repo belonging to a GitHub organization even though he had been given the correct level of access.
Check the Windows Credential Manager, especially if you've been using the same machine for some time or have connected to different accounts.
Git may be picking up the wrong credentials without you realizing it, and that's why it can't find the repo.
To be on the safe side, delete all the credentials that have to do with git/github. You'll know you have done it properly and are starting from a fresh state when you will try cloning again and git will ask you to authorize it through your browser.
probably you try the wrong account only add this
account.name# to link
you can learn it from your GitLab account
https://account.name#gitlab.com/samrak-growth/samrak-app-backend.git
In my specific case (setting up a new mac) the root cause was a "missing xcrun" meaning the local dev tools wasn't activated, and the local git client can't run properly.
that was my fix
xcode-select --install
In my case I had used SourceTree's "Add account" setting to add my Bitbucket and GitHub accounts to SourceTree under the SSH protocol. SourceTree did everything correctly to generate SSH keys and add them to my machine but it made a slight mess of the entries that it added to my ~/.ssh/config file. It created entries as follows:
Host username-Bitbucket
HostName bitbucket.org
User username
PreferredAuthentications publickey
IdentityFile /Users/adil/.ssh/username-Bitbucket
UseKeychain yes
AddKeysToAgent yes
Host username-GitHub
HostName github.com
User username
PreferredAuthentications publickey
IdentityFile /Users/adil/.ssh/username-GitHub
UseKeychain yes
AddKeysToAgent yes
The Host values it generated are incorrect. I changed the entries in my ~/.ssh/config file to the following:
Host bitbucket.org
User username
PreferredAuthentications publickey
IdentityFile /Users/adil/.ssh/username-Bitbucket
UseKeychain yes
AddKeysToAgent yes
Host github.com
User username
PreferredAuthentications publickey
IdentityFile /Users/adil/.ssh/username-GitHub
UseKeychain yes
AddKeysToAgent yes
After making this change, the "This is not a valid source path / URL" error went away and I was able to clone repositories from my Bitbucket and GitHub accounts without problem.
I removed and added my account again using the HTTPS rather than SSH URL.

How to set up Netbeans, Mercurial and BitBucket with SSH

I set up Mercurial (actually TortoiseHg) to work so that Netbeans could interact with BitBucket. I set it up with HTTPS, but now I'm trying to use SSH instead. I'm not having much success. Here are the steps I took:
First, I opened PuTTYgen and generated an SSH2-RSA key. I wrote my email - the same one I used to register on BB, I don't know if that matters - as the Key comment. Anyway, I uploaded the public key to BitBucket and it accepted it.
Then I created a private key and added it with pageant, as this page instructs. After that I made a command from the command line to verify it worked:
hg clone ssh://hg#bitbucket.org/myaccount/myrepo
It worked - cloned the entire repo to my computer. But then I went over to Netbeans and right-clicked on my project and went to Mercurial > Properties.... I filled out the box like this:
default-push: ssh://hg#bitbucket.org/myaccount/myrepo
default-pull: ssh://hg#bitbucket.org/myaccount/myrepo
username: My Name <my#email.com>
I tried to push/pull my repo, but it didn't do anything. I'm using Netbeans 7.0.1. How do I fix this?
You can setup your repo as https. I already tried and it works.
default-push: https://hg#bitbucket.org/myaccount/myrepo
default-pull: https://hg#bitbucket.org/myaccount/myrepo
username: My Name <my#email.com>
You will need to setup the SSH link in the hgrc file for the repository or the one that is used by Netbeans.
Details can be seen here, how it can be setup: http://wiki.netbeans.org/FaqHgSSH