Issue with Remote 'origin' already exists.
See original GitHub issueUser on forum reported that this issue. Talking to @ahmelsayed, it seemed to happen to others as well. It happened on and off. Our call did remove before adding. It was unlikely race condition in our codes given deployment lock. Looking at LibGit2Sharp did not reveal much clue.
I suggest to fix by checking if the remote exists and has the same refspec. If so, no need to remove and add remote (avoiding this code path in the first place). This should be the main scenario.
Remote 'origin' already exists.
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)
at LibGit2Sharp.Core.Proxy.git_remote_create_with_fetchspec(RepositorySafeHandle repo, String name, String url, String refspec)
at LibGit2Sharp.RemoteCollection.Add(String name, String url, String fetchRefSpec)
at Kudu.Core.SourceControl.Git.LibGit2SharpRepository.FetchWithoutConflict(String remoteUrl, String branchName)
at Kudu.Services.ServiceHookHandlers.ServiceHookHandlerBase.Fetch(IRepository repository, DeploymentInfo deploymentInfo, String targetBranch, ILogger logger, ITracer tracer)
at Kudu.Services.FetchHandler.<PerformDeployment>d__12.MoveNext()
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Remote Origin Already Exists Error: How To Fix It
Solving the "Remote Origin Already Exists" Error in Four Different Ways · 1. Remove the Existing Remote · 2. Update the Existing Remote's...
Read more >How to fix 'fatal: remote origin already exists' Git error
fatal: remote origin already exists is caused by the cloned repository already having a URL configured. Specifically, a URL that leads to the...
Read more >Remote origin already exists on 'git push' to a new repository
Remote origin already exists on 'git push' to a new repository · Give the output of the command $> git remote -v show...
Read more >How to Fix Git Error "Fatal: remote origin already exists"
The error `fatal: remote origin already exists` is caused when you attempt to create a link to a remote repository called “origin” when...
Read more >How to Deal with fatal: remote origin already exists Error
Another reason is trying to change the URL of the “origin” remote repository using the git remote add command. The remote add command...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@skapatech looks like libgit2sharp issue is still active. Can you try setting a
SCM_USE_LIBGIT2SHARP_REPOSITORY=0
app setting and check if that takes care of it?The linked libgit2sharp issue did not get traction unfortunately.