'GitHub create new repository
When I want to simply create the remote private repository on GitHub from my local existing repository by git commands.
git remote add origin https://github.com/"UserName"/"NameRemoteRepository".git
git push -u origin main
I received the error message:
remote: Repository not found. fatal: repository 'https://github.com/"UserName"/"NameRemoteRepository".git/' not found.
I check the same by SourceTree, change the type authentication on PAS, clean the Windows credentials and so on but result was the same (and I remember it's works early at September 2021).
Solution 1:[1]
I found the solution (at April 2022).
You must create the "NameRemoteRepository" repository on GitHub by GitHub WEB interface ("New" from "Your repositories") or by GitHub CLI tool before you will run the command git push -u origin main
P.S> Latter i found the mention of this fact on GitHub forum but doesn't found strong direction of that in Git or SourceTree documentation.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
