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.
Related
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
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
I'm new to github and I couldn't seem to find a solution to my problem, so bear with me a little.
I'm trying to push changes that I've made to a forked repo via command line on an ec2 ubuntu instance from aws. After making changes to my file, I committed the file I changed and then pushed it over to git:
ubuntu#ip-172-31-33-24:~/bitstarter$ git push origin master
Username for 'https://www.github.com': edasaur
Password for 'https://edasaur#www.github.com':
fatal: Authentication failed
I'm hypothesizing that this might be an issue with the fact that I'm pushing over to a forked repo because when I attempted to commit and push changes over to a repository that I started, it seemed to work. However, I'm at a loss at what to do. When I tested whether my SSH key worked via the command:
ubuntu#ip-172-31-33-24:~/bitstarter$ ssh -T git#github.com
Hi edasaur! You've successfully authenticated, but GitHub does not provide shell access.
Thanks in advance!
First, you are pushing using an https address, so any ssh settings you might have won't have any bearing on the completion of the (https) push.
Second, the right https url you should use is:
https://edasaur#github.com/edasaur/bitstarter.git
(no need for www.github.com)
(I like to put the username in the url: that is one less data to enter when pushing)
That means you can set your url with:
git remote set-url origin https://edasaur#github.com/edasaur/bitstarter.git
Third, double-check your password (and see if there is any special character in it like an '#', which might not be directly supported over an http query)
If nothing works, you can still fallback on ssh url:
git remote set-url origin git#github.com:edasaur/bitstarter.git
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.
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)