Created
August 26, 2011 23:29
Forks a repository using API v3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import org.eclipse.egit.github.core.RepositoryId; | |
import org.eclipse.egit.github.core.client.GitHubClient; | |
import org.eclipse.egit.github.core.service.RepositoryService; | |
public class Fork { | |
public static void main(String... args) throws IOException { | |
GitHubClient client = new GitHubClient(); | |
client.setCredentials("user", "passw0rd"); | |
RepositoryService service = new RepositoryService(client); | |
RepositoryId toBeForked = new RepositoryId("kevinsawicki", "gitective"); | |
service.forkRepository(toBeForked, "jenkinci"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment