My intent here is to use a "Personal Access Token" to be able to clone/pull from this repo (GitLab) in a java application. I just can't figure out how to get around this error.
Here is the code I have.
String accessToken = conf.getString("accessToken");
String uri = "https://gitlab-ci-token:" + accessToken + "@gitlab.com/dfurrer/cosmotronsBinaries.git";
CredentialsProvider cp = new UsernamePasswordCredentialsProvider("PRIVATE-TOKEN", accessToken);
git = Git.cloneRepository()
.setURI(uri)
.setCredentialsProvider(cp)
.setRemote("origin")
.setBranch("master")
.call();
I get his exception:
org.eclipse.jgit.api.errors.TransportException: https://gitlab-ci-token@gitlab.com/dfurrer/cosmotronsBinaries.git: git-upload-pack not permitted on 'https://gitlab-ci-token@gitlab.com/dfurrer/cosmotronsBinaries.git/'