code: public File createGitRepository(String repositoryName) throws IOException {
          RepositoryService service = new RepositoryService();
          service.getClient().setOAuth2Token(oAuthToken);
          Repository repository = new Repository();
          repository.setName(repositoryName);
          repository = service.createRepository(repository);
          repositoryLocation = repository.getHtmlUrl();
  
          CloneCommand cloneCommand = Git.cloneRepository()
                  .setURI(repository.getCloneUrl())
                  .setDirectory(localGitDirectory);
          addAuth(cloneCommand);
          try {
              localRepository = cloneCommand.call();
          } catch (GitAPIException e) {
              throw new IOException("Error cloning to local file system", e);
          }
          return localGitDirectory;
      }
docs: Creates a repository on GitHub and in a local temporary directory. This is a one time operation as
  once it is created on GitHub and locally it cannot be recreated.