Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Create Remote Repository from client machine(Create Remote Repository from client machine)
Create Remote Repository from client machine [message #1694921] Sat, 09 May 2015 11:48 Go to next message
viral patel is currently offline viral patelFriend
Messages: 1
Registered: May 2015
Junior Member
Using Java code, how we are able to create a remote repository.
I am using https protocol for communication from client to remote
Re: Create Remote Repository from client machine [message #1695047 is a reply to message #1694921] Mon, 11 May 2015 15:14 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 274
Registered: July 2009
Senior Member
You cannot create remote repos with native git and also not with EGit. It depends on the git server you are using on how to create new repos.

Ciao
Chris
Re: Create Remote Repository from client machine [message #1724903 is a reply to message #1695047] Fri, 26 February 2016 22:14 Go to previous messageGo to next message
shiva th is currently offline shiva thFriend
Messages: 1
Registered: February 2016
Junior Member
Christian Halstrick wrote on Mon, 11 May 2015 15:14
You cannot create remote repos with native git and also not with EGit. It depends on the git server you are using on how to create new repos.


Can you please elaborate on what is the process to create the Remote repository using JGit.

We are in the process of migrating from current SVN to new GITHub.

As part of automation we were creating a new repository remotely on SVN.
We are trying to do the same using Github now using JGit, but not able to.

Your help is greatly appreciated.

Thanks in advance.

[Updated on: Fri, 26 February 2016 23:40]

Report message to a moderator

Re: Create Remote Repository from client machine [message #1724931 is a reply to message #1724903] Sat, 27 February 2016 10:31 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
As Christian said, creation of a new Git repository on a remote system isn't standardised and
depends on the specific API provided by the git server you are using. Hence JGit doesn't support that.

If you want to create a repository in Github use their REST API endpoint [1] for that.

The EGit Mylyn github connector provides a Java client for calling the github REST API,
you may find this library in the Eclipse Maven repository hosted on repo.eclipse.org [1].

If you are using Maven add the following dependency
<dependency>
<groupId>org.eclipse.mylyn.github</groupId>
<artifactId>org.eclipse.egit.github.core</artifactId>
<version>4.2.0.201601211800-r</version>
</dependency>

Use can use org.eclipse.egit.github.core.service.RepositoryService.createRepository() to create a repository.

[1] https://developer.github.com/v3/repos/#create
[2] https://repo.eclipse.org/#nexus-search;gav~org.eclipse.mylyn.github~org.eclipse.egit.github.core~~~~kw,versionexpand
Previous Topic:Clone Repo with ssh + privatekey
Next Topic:Create Remote Git Repository using JGIT
Goto Forum:
  


Current Time: Tue Apr 23 14:32:59 GMT 2024

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

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

Back to the top