Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » bare repository
bare repository [message #888044] Sun, 17 June 2012 15:39
Missing name Missing name is currently offline Missing name Missing name
Messages: 1
Registered: June 2012
Junior Member
For testing purpose I am trying to create a local bare repository like this:

        FileRepositoryBuilder builder = new FileRepositoryBuilder();
        Repository repository = builder.setGitDir(new File(remotePath))
                .readEnvironment() // scan environment GIT_* variables
                .findGitDir()
                .build();


Of course when I try to clone I get an exception:

org.eclipse.jgit.api.errors.JGitInternalException: Invalid remote: origin
	at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:128)


I have probably to create a local emtpy repo then add a remote then push and then pull:

git init
git remote add origin remotepath
git pull origin master


What is the correct way to do this in jgit??

Thanks

Andrea
Previous Topic:gitolite, on egit failes, on bash works, frustration lvl rising
Next Topic:core.autocrlf=true still buggy with 2.0.0-rc2
Goto Forum:
  


Current Time: Tue Oct 21 19:56:37 GMT 2014

Powered by FUDForum. Page generated in 0.02208 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software