Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Accessing git
PostPosted: Sun Feb 14, 2010 1:41 pm 
Offline
Newbie

Joined: Sun Feb 14, 2010 1:29 pm
Posts: 2
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?


Top
   
 Post subject:
PostPosted: Sun Feb 14, 2010 1:55 pm 
Offline
Senior Member

Joined: Fri Sep 21, 2007 4:12 pm
Posts: 78
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


Top
   
 Post subject:
PostPosted: Mon Feb 15, 2010 11:24 am 
Offline
Newbie

Joined: Sun Feb 14, 2010 1:29 pm
Posts: 2
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 :-)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group