0

In VS Code terminal git remote repository url are configured properly but when I tried to do push or pull action, getting the fatal error message

I've installed GitLens extension and able to do normal git operations from VS Code command prompt

Git: fatal: '[email protected]' does not appear to be a git repository

enter image description here

2 Answers 2

1

I could solve this weird VSCode bug with below steps

git remote add origin https://... [ already done ]
git remote show origin # if everything is ok, you will see your remote [ already done ]
git push -u origin master # assuming your are on the master branch. 
//[ This step has solved the problem ]

Reference https://stackoverflow.com/a/43364619/2607372

Sign up to request clarification or add additional context in comments.

1 Comment

Just a quick note to say that as of late 2021 the default name that GitHub uses for the main branch is now main, so for lots of people the third step will now be git push -u origin main
0

That's due to following reasons :

  1. You may not have initialized the repo properly (and that happens some times)

  2. There's already an existing git file and you might be overwriting it (in this case it's fatal)

These are main causes which I happened to come with.... So, yeah.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.