Michael Horvilleur
Michael Horvilleur

Reputation: 149

Switching Remote Urls from HTTPS to SSH

I tried to switch from a HTTPS to SSH repo using git. Below are the first commands I used.

enter image description here

Then, when I tried to add a branch to the staging area, I got the following messages:

enter image description here

I am not able to push anything or add any commits to git from my command line either. I get an error saying "could not read remote repository". Could someone please help me? What should I do now? I am new to git and I don't want to dig myself in a deeper hole!

Upvotes: 2

Views: 259

Answers (1)

VonC
VonC

Reputation: 1323753

Check for a .git/ subfolder in:

  • your current working directory (where you switch to SSH)
  • your parent folders

If you see one in any parent folder, that would make your current working directory a nested Git repository.

Ideally, there should not be any parent Git repository above your own: see if you can remove those parent .git folders (or move them elsewhere).

Upvotes: 1

Related Questions