| Author |
Message |
donnek
Joined: 14 Feb 2010
Posts: 2
|
| Posted: Sun Feb 14, 2010 12:41 pm Post subject: Accessing git |
|
|
I'm having difficulty accessing git on my Linode (Ubuntu). I followed the very good howto in the library, but that has problems, so I tried back-to-basics, but that has problems too, as follows:
On the Linode I do:
(su) apt-get install git-core
mkdir myrepo.git
git init --bare
On my local machine, I do:
cd <dir which will be the local repo>
git init
git add <myfile>
git commit -m "first commit"
git remote add origin ssh://myuser@mylinode.com/myrepo.git
git push origin master
I get the message:
fatal: 'myuser@mylinode.com/myrepo.git' does not appear to be a git repository
All the howtos I've read on the web say this should work, but it doesn't. Can anyone give me any clues as to why? |
|
| Back to top |
|
kbrantley
Joined: 21 Sep 2007
Posts: 77
|
| Posted: Sun Feb 14, 2010 12:55 pm Post subject: |
|
|
You don't want to init the repo locally, you probably want to clone it. Second, unless your repo is stored in /myrepo.git on your linode, you probably want to specify the full path.
Server:
$ cd ~
$ mkdir myrepo.git
$ cd myrepo.git
$ git init --bare
Client:
$ git clone ssh://user@host/home/USERNAME/myrepo.git
$ git add file.c
$ git commit -m "commitlog"
$ git push |
|
| Back to top |
|
donnek
Joined: 14 Feb 2010
Posts: 2
|
| Posted: Mon Feb 15, 2010 10:24 am Post subject: |
|
|
| Hey - thanks for this. That got it working. I've also applied it to the Linode howto, and that's working now too. All I have to do now is learn git :-) |
|
| Back to top |
|
| |