-2

$ git push -u origin main

fatal: unable to access 'https://github.com/vertalQ/demo-repo2.git01~/': The requested URL returned error: 400

When I try to push changes to my GitHub repo, it pops up with that error. This is an attempt to start a new repo through the command line. I have set up an SSH key already but it still does not allow for access. Any possible reasons as to why this is the case?

vertaQ
  • 1
  • More information regarding the issue: I have two repositories in VScode open in one file. I have followed all directions that GitHub has given me for starting a new repository through the command line. I hope this clears a few things up. – vertaQ Dec 29 '22 at 03:19
  • 4
    Looks like the URL for the remote is not correct (look at the closing `01~/`) – eftshift0 Dec 29 '22 at 03:38
  • 1
    What does it show when you do `git remote -v`? I bet it shows a typo. – Mike Kim Dec 29 '22 at 03:50

1 Answers1

1

01~ in the URL looks suspicious. From my experience, such a GitHub URL is invalid. You can fix it if you remove that odd symbols.

git remote set-url origin https://github.com/vertalQ/demo-repo2.git

I looked at https://github.com/vertalQ/, you don't seem to have demo-repo2. You might want

git remote set-url origin git@github.com:vertalQ/REPO2.git
273K
  • 29,503
  • 10
  • 41
  • 64