Closed
Description
Hi,
I am using this jar in my project. Happy to know that possible to create repo from java in GitHub. Thanks for your efforts..
I just added jars and tried to test as a java application, but I got an error, which says .github folder is not available.
Here is my code,
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
String name = "name - new-repo";
String description = "description - this is my new repository";
String homepage = "homepage - http://www.kohsuke.org/";
boolean isPublic = true;
GitHub github = GitHub.connectUsingPassword("myUserName", "password");
GHRepository repo = github.createRepository(name, description, homepage, isPublic);
System.out.println(repo.getOwner());
System.out.println(repo.getLanguage());
}
And the exception is as follows,
Exception in thread "main" java.io.FileNotFoundException: C:\Users\user\ .github (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at org.kohsuke.github.GitHub.connect(GitHub.java:144)
at com.votsh.repository.GitRepo.main(GitRepo.java:28)
Thanks in advance
Metadata
Metadata
Assignees
Labels
No labels