I have created a central repository on a Linux server following this tutorial:
http://rypress.com/tutorials/git/centralized-workflows
So basically I actually have this folder:
MyServer@MyUser:~/repositories/backend-central-repo.git$
on my server that represent my remote GIT repository.
I am connecting to this server via SSH using an address like: MyServer.cloudapp.net, the username MyUser and the related password.
Now on my local machine I have a local GIT repository like:
Andrea@Andrea-PC MINGW64 ~/Documents/TESTREPO (master)
In this repository I have committed a test.txt file, infact I have this commit:
$ git log
commit a11633549763c4cc905a721932c4c6bdc1a1091c
Author: AndreaNobili <nobili.andrea@gmail.com>
Date: Tue Oct 4 20:17:35 2016 +0200
test
Then, on my local repository I have added the remote repository as origin, doing:
$ git remote add origin MyServer.cloudapp.net/repositories/backend-central-re
po.git$
Then I try to do:
Andrea@Andrea-PC MINGW64 ~/Documents/TESTREPO (master)
$ git remote -v
origin MyServer.cloudapp.net/repositories/backend-central-repo.git$ (fetch)
origin MyServer.cloudapp.net/repositories/backend-central-repo.git$ (push)
What it means? That it work fine?
"doesn't not appear to be a git repository
The ssh url for your repo should be
MyUser@MyServer.cloudapp.net:/home/MyUser/repositories/backend-central-repo.git
Try in your local repo:
git remote set-url origin MyUser@MyServer.cloudapp.net:/home/MyUser/repositories/backend-central-repo.git
Then, if your remote repo is empty, you can push your local repo to it:
git push -u origin master