Why am I getting this error when my git repository url is correct?
jitendra@JITENDRA-PC /c/mySite (master)
$ git push beanstalk master
fatal: \'git@skarp.bea
You've got the syntax for the scp
-style way of specifying a repository slightly wrong - it has to be:
[user@]host.xz:path/to/repo.git/
... as you can see in the git clone documentation. You should use instead the URL:
git@skarp.beanstalkapp.com:/gittest.git
i.e. in the URL you're using, you missed out the :
(colon)
To update the URL for origin you could do:
git remote set-url origin git@skarp.beanstalkapp.com:/gittest.git
my local and remote machines are both OS X. I was having trouble until I checked the file structure of the git repo that xCode Server provides me. Essentially everything is chmod 777 * in that repo so to setup a separate non xCode repo on the same machine in my remote account there I did this:
REMOTE MACHINE
LOCAL MACHINE
For me, i learned getting a clean start with a git repo on a LOCAL and REMOTE requires all initial work in a shell first. Then, after the above i was able to easily setup the LOCAL and REMOTE git repos in my IDE and do all the basic git commands using the GUI of the IDE.
I had difficulty until I started at the remote first, then did the local, and until i opened up all the permissions on remote. In addition, having the exact full path in the URL to the symlink was critical to succeed.
Again, this all worked on OS X, local and remote machines.
I had a similar problem when using TFS 2017. I was not able to push or pull GIT repositories. Eventually I reinstalled TFS 2017, making sure that I installed TFS 2017 with an SSH Port different from 22 (in my case, I chose 8022). After that, push and pull became possible against TFS using SSH.
It is most likely that you got your repo's SSH URL wrong.
To confirm, go to your repository on Github and click the clone or download button
. Then click the use SSH
link.
Now copy your official repo's SSH link. Mine looked like this - git@github.com:borenho/que-ay.git
You can now do git remote add origin git@github.com:borenho/que-ay.git
if you didn't have origin
yet.
If you had set origin
before, change it by using git remote set-url origin git@github.com:borenho/que-ay.git
Now push with git push -u origin master
I have a similar problem, but now I know the reason.
After we use git init
, we should add a remote repository using
git remote add name url
Pay attention to the word name
, if we change it to origin
, then this problem will not happen.
Of course, if we change it to py
, then using git pull py branch
and git push py branch
every time you pull and push something will also be OK.
I was facing same issue with my one of my feature branch. I tried above mentioned solution nothing worked. I resolved this issue by doing following things.