3
我一直在使用jcabi,GitHub的下面尝试是我的代码如何使用java连接到我公司的git hub门户?
Github github = new RtGithub("<Oauth token>");
Iterable<Repo> repo = github.repos().iterate("");
for (Repo repo2 : repo) {
System.out.println(repo2);
}
但这给错误
{"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"}>
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
我试图连接到我的公司是https://github.corp.xyz.com/
git的枢纽账户任何帮助?
的消息说坏证书和代码表明没有凭据。 jcabi-github的javadoc似乎也没有任何有关身份验证的信息。除非有充分的理由,否则我会联系开发人员,询问如何进行身份验证。 – psycotik
这是用于验证的代码的一部分。 Github github =新RtGithub(“”)在他们的网站/博客上阅读,我可以通过用户名/密码aur OAuth令牌 –
Pratik
尝试使用用户名/密码 – psycotik