Create new repo by 'git remote add origin' and 'push'

ses

When creating a local repo and trying to push it to github, ending up with an issue:

ERROR: Repository not found.
fatal: The remote end hung up unexpectedly

My steps are standard - that what gitHub Help suggests to go with.

touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin [email protected]:MyUser/my-samples.git
git push -u origin master

Then: git push -u origin master

Q: How can I push new repo/branch to the github?

Just clarifying: I wan to create New repository from command line remotely - it does not exist yet on my github.

Basically I'm trying to perform 11th step on http://try.github.io/

Btw. when I try to use https:// instead of just [email protected]:... (following that steps) I end up having 403 error.

If I use "ssh://", adding my keys on github, I end up having Repository not found error. But that test sh -T [email protected] passes successfully,

So UPDATE: yes I've checked my connection.

Akash Agrawal

You will need to create a repo on github to be able to push your changes to it. Bare repos are not initialized automatically. Otherwise spelling mistakes can lead to undesirable creation of new repos.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

push new git branch to remote repo on eclipse

From Dev

git push all remote branches to a new origin

From Dev

git push all remote branches to a new origin

From Java

Git push existing repo to a new and different remote repo server?

From Dev

Push local new Git repo to existing remote repo as branch?

From Dev

Can `git push --mirror` create a new repo?

From Java

Push local Git repo to new remote including all branches and tags

From Java

Remote origin already exists on 'git push' to a new repository

From Dev

Webstorm Git new remote repository: Push to origin/master was rejected

From Dev

Can I add a file to my local Git repo but not push it to remote

From Dev

Push git alias to remote repo

From Dev

Failure to push to remote repo in Git

From Dev

What happens if you switch your git remote origin to a new repo and git pull?

From Dev

What happens if you switch your git remote origin to a new repo and git pull?

From Dev

Git add remote and push to

From Dev

Git add remote and push to

From Dev

git push origin [local-branch] tries to push into remote main branch instead of creating a new one

From Dev

Can't create / add a new branch to a git repo with gitpython

From Dev

Can't create / add a new branch to a git repo with gitpython

From Dev

How do I push a new repo to a remote?

From Dev

Force a certain version of git on push to remote repo

From Dev

Push to a remote origin on a subfolder of git repository?

From Dev

git remote push origin changed and cannot reset

From Dev

Push local git to new remote

From Java

Git: How to remove remote origin from Git repo

From Dev

Why when I checkout a new branch using Git and push this new branch to origin repo, the base commit ID is 0000000000000000000000000000000000000000?

From Dev

Push local repo to new sub-directory of remote repo

From Dev

Git - Push current Heroku repo to a remote github repo

From Dev

Git - Push current Heroku repo to a remote github repo

Related Related

  1. 1

    push new git branch to remote repo on eclipse

  2. 2

    git push all remote branches to a new origin

  3. 3

    git push all remote branches to a new origin

  4. 4

    Git push existing repo to a new and different remote repo server?

  5. 5

    Push local new Git repo to existing remote repo as branch?

  6. 6

    Can `git push --mirror` create a new repo?

  7. 7

    Push local Git repo to new remote including all branches and tags

  8. 8

    Remote origin already exists on 'git push' to a new repository

  9. 9

    Webstorm Git new remote repository: Push to origin/master was rejected

  10. 10

    Can I add a file to my local Git repo but not push it to remote

  11. 11

    Push git alias to remote repo

  12. 12

    Failure to push to remote repo in Git

  13. 13

    What happens if you switch your git remote origin to a new repo and git pull?

  14. 14

    What happens if you switch your git remote origin to a new repo and git pull?

  15. 15

    Git add remote and push to

  16. 16

    Git add remote and push to

  17. 17

    git push origin [local-branch] tries to push into remote main branch instead of creating a new one

  18. 18

    Can't create / add a new branch to a git repo with gitpython

  19. 19

    Can't create / add a new branch to a git repo with gitpython

  20. 20

    How do I push a new repo to a remote?

  21. 21

    Force a certain version of git on push to remote repo

  22. 22

    Push to a remote origin on a subfolder of git repository?

  23. 23

    git remote push origin changed and cannot reset

  24. 24

    Push local git to new remote

  25. 25

    Git: How to remove remote origin from Git repo

  26. 26

    Why when I checkout a new branch using Git and push this new branch to origin repo, the base commit ID is 0000000000000000000000000000000000000000?

  27. 27

    Push local repo to new sub-directory of remote repo

  28. 28

    Git - Push current Heroku repo to a remote github repo

  29. 29

    Git - Push current Heroku repo to a remote github repo

HotTag

Archive