New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Closed
jasabalete opened this issue
Dec 9, 2015
· 41 comments
Assignees
Labels
bug
Issue identified by VS Code Team member as probable bug
verified
Verification succeeded
Comments
I have configured my git remote like this:
[remote "origin"]
url = http://MY-HOST.../branch-locatlocator-select-ui.git
And when i do a push show me an error:
fatal: Authentication failed for 'http://MY-HOST.../branch-locatlocator-select-ui.git/'
Why Visual Studio Code add the final slash?
joaomoreno
added
the
bug
Issue identified by VS Code Team member as probable bug
label
Dec 9, 2015
Oh that’s terrible, sorry for that!
I assume a simple git push
from the command line works, right?
Yes, «git push» from the command line works
Git seems to do this, not VS Code. Here’s a snippet from the command line:
$ git config remote.origin.url
https://github.com/joaomoreno/node-libarchive.git
$ git push
Username for 'https://github.com': joaomoreno
Password for 'https://joaomoreno@github.com':
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/joaomoreno/node-libarchive.git/'
Is your host by any chance GitHub or BitBucket? Which command line exactly are you using?
Closing as dupe of #490. Will reopen if further information reveals this to be an independent issue.
My repo is GitLab CE
$ git config remote.origin.url
http://ISLINGIP01.scisb.isban.corp/portales-branch-locator/branch-locator-select-ui.git
The URL with the final slash only apears in VSCode and if i put this URL in Chrome for example return ERR_TOO_MANY_REDIRECTS
Why VSCode connect with the remote and add a final slash?
Note: the error is in VSCode when I do a push or a pull in the Git feature
Is there any way you can set up a repository in that same server and give me credentials to access it so I can try to repro?
the same error in gitlab.com repository.
fatal: Authentication failed for 'https://gitlab.com/jasabalete/test-project.git/'
I invite you in a public repository for testing and «master» role
I do this:
1 — Create a public repository
2 — git clone https://blah/blah.git
3 — Open the folder with VSCode
4 — Commit and push a file
5 — VSCode add final slash «/» and error
fatal: Authentication failed for ‘https://blah/blah.git/’
git push origin master from command line works!
Thanks for the repo access. There was definitely a problem with VS Code’s credential helper. When running the push action, you should have seen this dialog:
The dialog is not showing up in 0.10.3
unfortunately. Fixed it and will be in for the December milestone.
With the fix, I was able to successfully push to the GitLab repo using the credentials I configured in the GitLab website.
This dialog is showing to me. I put the credentials and show the error
I am using the username that I found in the bottom left corner of the GitLab UI. You can’t use your e-mail address.
And the password set in the following dialog:
Please make sure you are using the right credentials, reset your password, try again, etc.
I know my credentials. I use this repository from several project with eclipse and command line too and works with ssh and https connections.
Thank for all
If you use the SSH remote url, it should all work, since no password prompt will occur.
If you use HTTPS, you should get the prompt. I do, I input the credentials I configured in GitLab and it works for me.
Maybe it’s platform specific? Which platform are you on?
I have a development server on my domain that’s running Bonobo Git Server set up to use Windows authentication. My credentials work everywhere except in VS Code. I get a similar authentication error with the trailing slash.
The new versión of VSCode WORKS
Thanks and go on!
I’m using VSCode 0.10.6 (newest version) and I still have this problem.
I also arise same bug on windows8.
I support the cache credential helper as a workaround until we tackle this issue head on.
I’m running into this problem too.
Ubuntu 15.10 (inside virtualbox on win10 pro)
VS Code -v 0.10.10
I do not get presented with a credential dialog.
I am able to successfully push from command line.
doing git config push.default matching
, pushing from commandline and then trying again from vsCode made no difference.
Similar set up to BryanConradHart getting the error
I am also facing the same problem
The authentication dialog was fixed by #1796, it should start coming up on the next release.
Meanwhile, I do suggest using a credential helper.
I’m running into the same error.
I can git push from the command line, but can’t through VS Code.
I get the following error:
Please make sure you have the correct access rights
and the repository exists.
I downloaded and installed the credential helper then tried both:
git config credential.helper cache
as well as
git config credential.helper store
but still doesn’t work.
ps. I’m using version 1.2.1
Thanks a lot for your support.
I was having a similar problem with OSX. I turned OFF 2 — factor authentication and the problem resolved itself.
I tried pushing to git hub but I got an error message saying couldn’t connect to server . What can I do?
I followed all the push instruction , disabled the wifi proxy settings and used LAN cable but still nothing
vscodebot
bot
locked and limited conversation to collaborators
Nov 17, 2017
Labels
bug
Issue identified by VS Code Team member as probable bug
verified
Verification succeeded
Feb 22, 2019
• 2 min read
Visual Studio ships with the Git credential Manager for Windows (GCMW) as part of its Team Explorer feature. This nifty little helper allows you to authenticate to Azure Repos among other git providers using your normal username and password and optional 2FA and it will handle the Personal Access Token + Renewal for you. There are cases when you need a specific (usually newer) version of the GCMW.
One of those current scenarios is when you want to access a Microsoft Account backed Azure DevOps organisation using an Azure Active Directory account:
Similar issues have occurred in the past while trying to access BitBucket. The error was slightly different in this case, but the root cause was the same:
Git failed with a fatal error.
HttpRequestException encountered.
cannot spawn /C/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/Git/mingw32/libexec/git-core/git-askpass.exe: No such file or directory
could not read Username for 'https://github.com': terminal prompts disabled.
Solution
In all of these cases, the recommendation is to upgrade the Git credential Manager for Windows. Many posts on Stack Overflow will tell you to overwrite the files in your Visual Studio installation with the latest files from the GCMW repository. While this usually works (I’ve done this myself in the past), it can cause issues when installing a Visual Studio Update in the future.
A better solution
It’s better to point Git to a specific version of the Git Credential Manager for Windows. First install the latest version of the Git credential Manager for Windows. You can always find the latest version of the Git Credential Manager for Windows here. Then update your global git config:
c:>git config --global --edit
Find the [credential]
section and overwrite it with (update the path to the location where git-credential-manager.exe
is installed on your system:
[credential]
helper = C:\\Program\ Files\\Git\\mingw64\\libexec\\git-core\\git-credential-manager.exe
This will ensure that all Git installations on your system will use this specific installation of GCMW.
Restart any open instances of Visual Studio and optionally clear your existing credentials from the Windows Credential Manager before trying again:
When all else fails, you can turn off the Git Credential Manager completely to fall back to the default prompt-for-password behavior:
[credential]
helper =
Git is a popular version control software that every developer should know how to use. But sometimes, it pops out strange errors that confuses even seasoned users. If you are seeing “Authentication failed” whenever you try to use git push
command, this short article is going to help you solve this error message.
The “fatal: Authentication failed” error message indicates that the existing authentication method you have been using on your repository has become obsolete/outdated. The full error message may look like this
Code language: JavaScript (javascript)
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/user/example-project.git/'
Or if you’re pushing to your remote repository via HTTPS, the error message may look like this
If you enabled two-factor authentication in your Github account you won't be able to push via HTTPS using your accounts password. Instead you need to generate a personal access token. This can be done in the application settings of your Github account. Using this token as your password should allow you to push to your remote repository via HTTPS. Use your username as usual.
Usually, the “Authentication Failed” error happens if you recently enabled 2-Factor Authentication on your GitHub account and uses HTTPS to push/pull in Git at the same time. GitHub deprecates the password authentication method from August 13, 2021 to favor more secure way of authentication. In this article, we will show you several possible ways to get around the “fatal: Authentication failed” problem.
Switch to SSH protocol in Git
As being said earlier, Github is no longer allow authenticating via HTTPS URLs once 2-Factor Authentication (2FA) enabled. Git with HTTPS uses public-key encryption-based authentication for doing every action like git push, git clone, git fetch and git pull, etc. Meanwhile, SSH protocol allows Git to securely transfer repository data over the internet.
In order to quickly fix “fatal: Authentication failed”, you can remove the existing origin (which is something like https://github.com:user/repo.git
) and re-add a [email protected]:user/repo.git
URL to instruct Git to use SSH instead. Run the following command to do so:
git remote -v git remote remove origin git remote add origin [email protected]:user/repo.git
If you didn’t set up the necessary private keys for Git, running the commands above will end up with an error message. You may need to consult access Github repositories using SSH keys and Connecting to GitHub with SSH for instructions on adding private keys.
Create a PAT (Personal Access Token)
When you connect to a GitHub repository from Git, you’ll need to authenticate with GitHub using either HTTPS or SSH. Alternatively, you can use Github CLI with the command gh auth login
. All of these authentication method requires a PAT (Personal Access Token) that is a more secure alternative to passwords. Follow the instructions below to create a PAT :
First, login to your account. In the upper right corner of the page, look for your avatar, click it and select Settings.
In the Settings page, choose Developer settings > Developer settings > Personal access tokens in the left sidebar.
Click Generate new token in order to create a new PAT. You will be able to name the token, set its expiration date and its scope. For a token that specifically for managing repositories, you should limit the scope to repo.
Finally, click Generate token. You would be redirected to another page which shows you the newly created token. Remember that the token will only be shown once. If you lost the token, you have no way to recover it but to re-generate a new one.
Treat your tokens like passwords and keep them in a secure place. The token should be stored in an environment variable instead of hardcoding them into your programs/applications source code.
Once you’re done creating a token, you have to reset the old password authentication by running the following command.
Code language: PHP (php)
git config --global --unset credential.helper
You may also need to update your repository to change the protocol from HTTPS to native SSH
git remote -v git remote remove origin git remote add origin [email protected]:user/repo.git
Disable Github 2-Factor Authentication
If you recently enabled 2-Factor Authentication(2FA) on your GitHub account right before the “Authentication Failed” error pops up, you can try disabling it to quickly fix the problem.
However, remember that disabling 2FA significantly increase the risk of your account to be compromised. Also, If you’re a member, billing manager, or outside collaborator to a public repository of an organization that requires two-factor authentication and you disable 2FA, you’ll be automatically removed from the organization, and you’ll lose your access to their repositories. In order to regain access to the organization, you have to re-enable 2FA and re-apply to the organization.
To disable 2FA for an account, you need to log into it, then click your profile photo in the upper right corner and select Settings.
Then, select Account Security in the left sidebar and click Disable in Two-factor authentication section.
Remove saved credentials on Windows
Windows users may beed to change your login or password of the Git service account stored in Windows Credential Manager.
First, you need to search for Windows Credential Manager from the Start menu. Usually it is placed in Control Panel if you use Windows 7 and Settings on newer Windows versions.
On the Credential Manager window, click on Windows Credentials tab and look for anything that starts with git:
or ada:
. In order to remove them, you would have to click each of them to open the details view and click Remove.
You may also need to remove them from Generic Credentials, too.
We hope that the information above helps you solve the “fatal: Authentication failed” error message in Git. You may want to check out our other guide on fixing other popular Git issues such as Git : how to accept all current/incoming changes, How to clone a private repository in Github or How to access GitHub from inside China.
I am using Visual Studio 2017 Community Edition (CE), and I have signed into my Microsoft account and I am connected to VSTS. I can see all my projects and repositories, but when I attempt to pull/fetch/push any changes I get the following error:
Error encountered while pushing to the remote repository: Git failed with a fatal error.
PushCommand.ExecutePushCommand
And accordingly for the fetch and pull commands too.
I installed Git for Windows on the Visual Studio 2017 installer and not only is it failing to work with VSTS, I am unable to work with any of my GitHub repositories too. Has anyone else noticed this? It’s happened on two of my machines so far.
Visual Studio 2015 Enterprise Edition (EE) and CE work completely fine for me.
It seems that this issue has gotten far more recognition that I thought it would which leads me to believe that this is an issue with how Visual Studio is dealing with Git. I have also noticed that every time I update Visual Studio, this problem pops back up, and I have to go through the steps in some of the answers below to get Git working again. I’m not sure why this is happening, and I also don’t know if Microsoft are planning to resolving this issue.
asked Mar 8 ’17 at 9:48
3
After I changed the generic credentials from Control Panel → User Accounts → Credential Manager for Git, it worked for me.
answered Jun 8 ’18 at 18:26
wbing520wbing520
1,4211 gold badge9 silver badges8 bronze badges
10
I’m going to add a solution here that the previous answers have not already mentioned, but this is what fixed it for me.
-
Navigate to
C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDECommonExtensionsMicrosoftTeamFoundationTeam Explorer
and delete theGit
folder. -
Make sure that there is no version of Git installed on your system, remove it by going to Control Panel → Program and Features (TortoiseGit does not need to be removed from my experience, just native git installations).
-
Open up the Visual Studio 2017 installer and untick «Git For Windows» in installation options.
-
Head over to the Git website and install the latest version of Git for Windows.
-
Go back into the Visual Studio installer and tick «Git for Windows» again. It will not download a new version even though it may look like it is. After that is done, your Git should be fine with VSTS and TF Explorer.
answered Apr 6 ’17 at 14:16
shamsham
3,4013 gold badges13 silver badges21 bronze badges
11
I had a different problem. My computer contained older OpenSSL DLL files in system32 and syswow64 so to fix my problem, I had to copy libeay32.dll
and ssleay32.dll
from one folder to another folder within the Git folders of Visual Studio 2017.
FROM: C:Program Files (x86)Microsoft Visual Studio2017
vs_editionCommon7IDECommonExtensionsMicrosoftTeamFoundationTeam ExplorerGitmingw32bin
TO: C:Program Files (x86)Microsoft Visual Studio2017
vs_editionCommon7IDECommonExtensionsMicrosoftTeamFoundationTeam ExplorerGitmingw32libexecgit-core
Ref.: Git — Can’t clone remote repository
answered Mar 9 ’17 at 8:42
flatrickflatrick
5293 silver badges6 bronze badges
7
In Control PanelAll Control Panel ItemsCredential Manager
==> Windows Credentials
Remove Git:http://……..
and Retry..
Enjoy !
answered May 2 ’19 at 9:49
2
I tried a lot and finally got it working with some modification from what I read in Git — Can’t clone remote repository:
-
Modify Visual Studio 2017 CE installation → remove Git for windows (installer → modify → single components).
-
Delete everything from
C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDECommonExtensionsMicrosoftTeamFoundationTeam ExplorerGit
. -
Modify Visual Studio 2017 CE installation → add Git for windows (installer → modify → single components)
-
Install Git on windows (32 or 64 bit version), having Git in system path configured.
Maybe point 2 and 3 are not needed; I didn’t try.
Now it works OK on my Gogs.
answered Mar 8 ’17 at 10:35
2
This is the error I was getting:
Git failed with a fatal error.
pull --verbose --progress --no-edit --no-stat --recurse-submodules=no origin
I tried all the previous methods, but they didn’t work. Later I found out that there were some conflicts in the code (see the Visual Studio 2017 output window).
I simply reverted the code and it worked.
answered Mar 22 ’17 at 10:44
GorvGoylGorvGoyl
28.3k21 gold badges152 silver badges156 bronze badges
I once had such an error from Git while I was trying to synchronise a repository (I tried to send my commits while having pending changes from my coworker):
Git failed with a fatal error.
pull —verbose —progress —no-edit —no-stat —recurse-submodules=no origin
It turned out that after pressing the Commit all button to create a local commit, Visual Studio had left one file uncommitted and this elaborated error message actually meant: «Commit all your changes».
That missing file was Entity Framework 6 model, and it is often shown as uncommitted file although you haven’t changed a thing in it.
You can do commit all or undo all changes that are not committed.
answered Jul 23 ’17 at 16:35
2
This appears to happen in VS 2017 when there is a pending commit that would conflict with the pull. If you go to a command terminal and do a «git pull origin», you will usually get the error that is the source of the confusion. To solve, check in all your changes in VS 2017 and then try the pull or sync again from VS 2017. Needless to say … this is not desired behavior in VS 2017.
answered Oct 26 ’17 at 9:02
GGleGrandGGleGrand
1,43318 silver badges40 bronze badges
I had the same issue. Restarting Visual studio worked for me… You may try it before reinstalling stuff.
answered Jun 5 ’17 at 19:18
I’m using GitKraken and Visual Studio 2017.
When GitKraken clones a repository, it leaves fetch address like «git@github.com:user/Repo.git», instead of «https://github.com/user/Repo.git».
To fix that, go to Team Explorer → Settings → Repository Settings → Remotes → Edit, and change «git@» to «https://» and «:» to «/».
answered Dec 23 ’17 at 22:18
AviusAvius
2602 silver badges8 bronze badges
I had this problem after changing the git access password!
I had to reset the credentials through the PowerShell console.
At the git repository folder level, the script was as follows:
git config --system --unset credential.helper
git config --system credential.helper store
git fetch
You will be prompted for the user and then the password.
The next command will no longer request authentication:
git fetch
answered Feb 6 ’19 at 13:20
When i do pull/fetch/push i got the above error in my output window, i followed the below soloution , it resovled my issue.
If you are using visual studio 2017 enterprise edition, replace the userId with your user id in the below command and execute this command in windows run window(windows key + R).
runas /netonly /user:UserId «C:Program Files (x86)Microsoft Visual Studio2017EnterpriseCommon7IDEdevenv.exe»
This will prompt for password, enter your password. A new visual studio instance will open and will start working properly…
answered Aug 13 ’19 at 12:49
Rex AndrewRex Andrew
3382 silver badges8 bronze badges
0
I had the same issue. The following steps solved the problem for me:
- Backup and delete «C:Program Files (x86)Microsoft Visual Studio 14.02017ProfessionalCommon7IDECommonExtensionsMicrosoftTeamFoundationTeam ExplorerGit»
- Install latest version of Git: https://git-scm.com/download/win
answered Mar 13 ’17 at 16:11
1
Wow! There are so many solutions to this problem!
Try this easy one!
Change your password!
Just the other day, I started getting this notice that my password would expire in 14 days. Now 2 days later, I am getting this error:
I really didn’t feel like hacking git or OpenSSL libraries, so I just changed the Windows password on my computer and it worked!
Update
Then it started happening again. From Team Explorer go to Sync. Then do Actions > Open Command Prompt. In the command prompt type git push origin
. That might work for you.
answered Oct 12 ’18 at 16:05
JessJess
20.9k18 gold badges112 silver badges131 bronze badges
1
I had a very similar problem and the instructions from a tech at Microsoft fixed it for me:
- Close all instances of Visual Studio.
- Open the Task Manager and check if any TFS Services are running. Select each of them and click on End Process Tree.
- Browse to the folder below and delete all the contents and folders in %LocalAppData%MicrosoftTeam Foundation{version}Cache
- Go to Control Panel -> User Accounts -> Manage your Credential -> Windows Credential, select the VSTS URL to remove it
- Then go to «C:UsersUSER NAMEAppDataLocalGitCredentialManagertenant.cache» and delete it
- Also go to «C:UsersUSER NAMEAppDataLocal.IdentityService» and delete it
answered Dec 3 ’19 at 22:43
CaseyCasey
414 bronze badges
I ran into this issue as well. I had sync’d my code earlier in the day so it made no sense that it suddenly gave this Git error. Restarting Visual Studio did not make any difference. After reviewing the above answers and not finding any clear solution, I decided to try syncing outside of Visual Studio using TortoiseGit which I already had installed. This worked. I was then able to sync within Visual Studio normally. If you don’t already have TortoiseGit, you may download it (free) from tortoisegit.org.
answered Jun 26 ’17 at 19:48
JerryJerry
411 silver badge3 bronze badges
1
In my case, Windows had ran an update and was waiting to restart the PC. I hadn’t seen any notifications but, well… turning it off and turning it on again fixed the problem.
Try that first before monkeying with any of these Visual Studio directories and applications.
answered Jun 16 ’17 at 13:26
RLHRLH
14.2k19 gold badges86 silver badges175 bronze badges
I got the following error messages using Visual Studio 2017 CE.
Failed to push to the remote repository. See the Output window for more details.
The output window showed the following:
Error encountered while pushing to the remote repository: Git process failed unexpectedly.
PushCommand.ExecutePushCommand
I tried to push changes using GitHub Desktop. It shows the following error message.
Cannot push these commits as they contain an email address marked as private on GitHub.
That’s It. Solution:
open GitHub account >> Settings >> Emails >> Uncheck «Keep my email address private»
It’s done. That was the problem in my case.
answered Jul 3 ’17 at 5:05
1
I got it working by removing username@ from http://username@asdf/xxx/yy/zzz.git in the repository settings:
Team Explorer → Settings → Repository Settings → Remotes → Edit
answered Jun 1 ’18 at 8:09
I had the same error pop up in VS 2017 when trying to delete a remote branch. The issue was that the branch was not on the server (using TFS2018 with GIT), but somehow Visual Studio did have it show up in the «remote/origin» section. This meant that I could not delete the remote branch (VS was giving out this error, while the server explorer didn’t show up the branch at all).
Here’s how to fix it (tested in VS 2017):
- In Visual Studio, double click on your «rogue» remote branch;
- VS should have now created a local branch from it;
- Right click on the local branch, select «Unset remote branch»;
- Right click on the local branch, select «Push branch»;
- You should now have a true corresponding remote branch;
- Delete the remote branch, then the local branch.
Hopefully it will help someone who ends up on this thread having the same issue as me.
answered Jun 13 ’19 at 12:43
I opened Credential Manager in Windows (not Visual Studio), selected «Windows Credentials», found my git:https//stash….com Generic Credential, clicked the bubble arrow down to make visible the User name and Password fields with Edit button. Clicked Edit, and put in my correct password there. Then started work right after that, no need to close anything.
answered Nov 2 ’20 at 13:20
0
I also had this issue after I got wget
from the GNU tools, and copied it right into c:windows. The libeay.dll
and libssl.dll
files were also in the archive. When those were in c:windows, I had this issue. Removing them immediately fixed it. So, check if you have these .DLLs somewhere in your path, VS may be picking up some other software’s version of these instead of using the ones it expects.
answered Aug 19 ’17 at 23:36
AngelBlueSky’s answer worked partially for me. I had to execute these additional lines to clean the Git global configuration after step 4:
git config --global credential.helper wincred
git config http.sslcainfo "C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt"
git config --global --unset core.askpass
git config --global --unset mergetool.vsdiffmerge.keepbackup
git config --global --unset mergetool.vsdiffmerge.trustexitcode
git config --global --unset mergetool.vsdiffmerge.cmd
git config --global --unset mergetool.prompt
git config --global --unset merge.tool
git config --global --unset difftool.vsdiffmerge.keepbackup
git config --global --unset difftool.vsdiffmerge.cmd
git config --global --unset difftool.prompt
git config --global --unset diff.tool
Then git config -l
(executed from any git repo) should return only this:
core.symlinks=false
core.autocrlf=false
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
diff.astextplain.textconv=astextplain
rebase.autosquash=true
user.name=xxxxxxxxxxxx
user.email=xxxxx@xxxxxx.xx
credential.helper=wincred
core.bare=false
core.filemode=false
core.symlinks=false
core.ignorecase=true
core.logallrefupdates=true
core.repositoryformatversion=0
remote.origin.url=https://xxxxxx@bitbucket.org/xxx/xxx.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
branch.identityserver.remote=origin
branch.identityserver.merge=refs/heads/identityserver
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
Run the git status
and git fetch
commands to validate that it works from the command line.
Then go to Visual Studio, where your repositories should be back, and all sync/push/pull should work without issues.
answered Jun 20 ’17 at 12:02
SoftlionSoftlion
11.5k10 gold badges53 silver badges82 bronze badges
After installing the last version of Git for Windows you must to open the configuration file to edit:
git config --global --edit
Click Insert, remove all the settings, click Esc, type :wq
and, Enter to save.
Now you can clone the repository by Bash or IDE with a valid user.
answered Sep 11 ’17 at 17:25
In my case I didn’t have to do anything so drastic as uninstalling Git as per some of the answers here; I just had to use the command line instead of Visual Studio.
Open up cmd
at your solution’s root and enter:
git pull
You will then be told exactly what the issue is. In my case it told me that I had uncommitted changes that would have been overwritten and that I needed to commit them before I could continue.
Once I had done this the pull succeeded, and I could resolve the conflict in the merge tool.
TLDR
Use the command line instead of Visual Studio to get a more complete error message.
answered Sep 21 ’17 at 11:00
BenBen
4,9957 gold badges40 silver badges57 bronze badges
1
I was getting similar issues. In Visual Studio 2017, with Rebase option I solved my issue.
I am having only a master branch. I rebase from master to origin/master (means to the same branch) and clicked Rebase. Before doing Rebase, the status was, I was committed my changes however not able to push/sync as my local branch base and Git code base was not synchronised state.
answered Nov 21 ’17 at 14:18
Compounded the problem by deleting the local repo so I could clone a fresh copy. I was faced with new error «git cannot be found Git failed with a fatal error.fatal: repository ‘xyz’ not found»
I tried everything suggestions i google about with no resolution.
The following simple step worked for me and I am adding it to the growing list of possible resolutions:
git config —get http.proxy result is http://google.com:80
this is not right so i got rid of it.
git config —global —unset http.proxy
answered Jun 26 ’18 at 15:25
In my case a failing Jest unit test preventing the push to the repo gives the same generic error of «Error encountered while pushing to the remote repository: Git failed with a fatal error.»
answered Aug 7 ’18 at 8:17
Rob CRob C
7251 gold badge8 silver badges23 bronze badges