GitHub pushing/pulling error - github

I'm kinda new to GitHub, and I just created my account and set it up, etc. I followed the steps very carefully on http://help.github.com/create-a-repo/ but then when I do the very last command ($ git push -u origin master) it says:
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
I have made the Repository, and it matches the name, but I still can't seem to get it to work. Any suggestions?

git will try to contact the remote repo you just declared in the previous line of the GitHub tutorial:
git remote add origin git#github.com:username/Hello-World.git
git push -u origin master
As illustrated in:
"Why are Github project document page urls case sensitive? What are the negative effects?", and
"github http clone returns 'did you run git update-server-info on the server'",
your error message is likely the result of a:
case mistake (git remote add origin git#github.com:username/**h**ello-**w**orld.git)
or url error (git remote add origin git#github.com:username/HelloWorld.git, forgot the '-').
The OP user1302394 confirms, in the comments:
git remote -v gives me:
origin git#github.com:username/Helloworld.git (fetch)
origin git#github.com:username/Helloworld.git (push)
Which means he/she combined a double whammy:
case mistake (world instead of World)
and url mistake (Helloworld insteadd of Hello-World)

Related

Git connects to different address than given for origin

when I use
git remote -v
I receive
origin git#github.com:user/repo.git (fetch)
origin git#github.com:user/repo.git (push)
Which looks quite fine, but if I then try to
git push origin
I receive
\302\226\302\226git#github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
After I checked and reassigned the ssh keys for a thousand times I became suspicious about the address and tried
git push git#github.com:user/repo.git
And it worked like a charm. Any idea where I can fix that?
It looks like you've got some Unicode control characters (specifically two U+0096 characters) in your remote URL. You can fix this by doing this:
$ git remote set-url origin git#github.com:user/repo.git
That will set the remote URL to the right thing, and then you should be able to push and pull as normal.

Fatal: master cannot be resolved to branch

Here's a screenshot of what I'm dealing with:
I'm a new GitBash user and am getting this error when trying to push to GitHub.
I was following this tutorial. So far I've not run into any problems, except I get this error when I try to push:
Fatal: master cannot be resolved to branch
Things I've done correctly:
I am signed in
I have specified my name and email using git config -global... *blah blah*
Everything is committed and should be ready to push
I'm on the master branch that I wish to push.
I've added my remote repository using command git remote add origin https://github.com/Tawnwen/MyApp.git.
I tried to push using the command git push -u origin master
Can anyone please help?

Unable to push changes into gerrithub.io

I have the repo here Link to the repo
I cloned it and did some changes but when I try to push it.
It gives me the following error:
$ git push origin HEAD:refs/for/master
Username for 'https://review.gerrithub.io': ardyflora
Password for 'https://ardyflora#review.gerrithub.io':
fatal: Authentication failed for
'https://review.gerrithub.io/ardyflora/virginPulseAuto/'
I have even added the ssh key. Any pointer or help will be appreciated :)
Authentication failure for HTTPS. Better you can take a try with SSH.
Copy the URL for SSH of your repository using a browser and update your local origin.
$ git remote set-url origin <ssh-clone-url>
$ git push origin HEAD:refs/for/master

What does the Git error "remote: Repository not found." mean?

After I issued
git push origin <branch-name>
and entered the access credentials, Git returned an error like so
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/<account-name>/<repository-name>.git'
What seems to be the problem?
The GitHub help page, "Error: Repository not found" summarizes the possible causes:
permission (which is what Monika refers to in the comments with "Cloned directly from repo…get error when pushing")
You might need to fork the repo, and, on your local repo, do a:
git remote rename origin upstream
git remote add origin https://YourUsername#github.com/YourUsername/YourFork
spelling: the name of the repo is case sensitive
non-existent repo

Github- repository is on remote but not found when pushing

I'm trying to push something to github and I'm getting this error;
Robbies-MacBook-Pro:assn-6-huffman-mac user$ git push -u origin master
fatal: repository 'https://github.com/BitMechanic/Stanford-CS106b/Huffman.git/' not found
Then when I check I get this;
Robbies-MacBook-Pro:assn-6-huffman-mac user$ git remote add origin https://github.com/BitMechanic/Stanford-CS106b/Huffman
fatal: remote origin already exists.
Robbies-MacBook-Pro:assn-6-huffman-mac user$ git remote -v
origin https://github.com/BitMechanic/Stanford-CS106b/Huffman.git
(fetch)
origin https://github.com/BitMechanic/Stanford-CS106b/Huffman.git
(push)
Anyone know what I'm doing wrong?
The proper url to use (for cloning and then pushing through origin) is
https://github.com/BitMechanic/Stanford-CS106b.git
not:
https://github.com/BitMechanic/Stanford-CS106b/Huffman.git
Stanford-CS106b is a repo, listed in the BitMechanic's repo page of d. Stanford-CS106b/Huffman is not.
To fix this, see git remote commands:
git remote rm origin
git remote add origin https://github.com/BitMechanic/Stanford-CS106b.git
or, simpler:
git remote set-url origin https://github.com/BitMechanic/Stanford-CS106b.git
Can you paste the
$cat .git/config
output here for reference.
Sometimes it is better to remove the remotes that are misbehaving from there and re-add it using the git remote add command again.