Github- repository is on remote but not found when pushing - github

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.

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: protocol 'git#https' is not supported

I have this message pushing my repo
C:\Users\sejjilali\Documents\Test forge>git push --set-upstream origin master
**fatal: protocol 'git#https' is not supported**
I don't know how to solve it, the problem is everything works normally in an other computer. Maybe it's because is a company one they landed me?
Here is my remote configuration:
C:\Users\sejjilali\Documents\Test forge>git remote -v
origin git#https://github.com/Saifou/testForge.git (fetch)
origin git#https://github.com/Saifou/testForge.git (push)
The URLs for your origin remote are malformed:
C:\Users\sejjilali\Documents\Test forge>git remote -v
origin git#https://github.com/Saifou/testForge.git (fetch)
origin git#https://github.com/Saifou/testForge.git (push)
The git# part comes from an SSH URL, but the rest looks like an HTTP URL. You can update them like so:
If you want to use SSH URLs, something like
git remote set-url origin git#github.com:Saifou/testForge.git
Note that in this case we also convert a / to a : right after github.com.
If you want to use HTTPS URLs, something like
git remote set-url origin https://github.com/Saifou/testForge.git
Once that's done, run git remote -v again to ensure that both URLs have been updated.
That's weird but once I had this error when I had '.git' in the path which is standard copy to clipboard from github
https://github.com/Saifou/testForge.git
change path to:
https://github.com/Saifou/testForge

make new repository in git hub

I have my project on GitHub at some location,
https:github.com/vidurasilva/loging_Form.git
I used the commands one by one and there has errors also,
C:\wamp\www\PhpProject>git remote add origin https:github.com/vidurasilva/Register_For_New.git
fatal: remote origin already exists.
C:\wamp\www\PhpProject>git push -u origin master
fatal: unable to access 'https:github.com/vidurasilva/loging_Form.git/': Couldn't resolve host 'github.com'
C:\wamp\www\PhpProject>git remote set-url origin git#github.com:vidurasilva/Register_Form_New.git
C:\wamp\www\PhpProject>git push -u origin --all
ssh: Could not resolve hostname github.com: Name or service not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
C:\wamp\www\PhpProject>git clone https:github.com/vidurasilva/Register_Form_New.git
Cloning into Register_Form_New...
fatal: unable to access https:github.com/vidurasilva/Register_Form_New.git/: Couldn't resolve host github.com
Try this:
git remote remove origin
git remote add https://github.com/vidurasilva/Register_Form_New.git
git push origin master
Further assistance is available in this article from GitHub support.
First fix this
git remote add origin https:github.com/vidurasilva/Register_For_New.git
with this
git remote add origin https://github.com/vidurasilva/Register_For_New.git
Then fix this
git clone https:github.com/vidurasilva/Register_Form_New.git
with this
git clone https://github.com/vidurasilva/Register_Form_New.git

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

GitHub pushing/pulling error

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)