Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Malformed URL exception while accessing Enterprise Repository and fetching data #526

Closed
m00lecule opened this issue Jul 12, 2019 · 4 comments

Comments

@m00lecule
Copy link

m00lecule commented Jul 12, 2019

I am getting this exception, while trying to connect to remote repository.

Exception in thread "main" java.net.MalformedURLException: no protocol: github.XXXX.com/repos/ilmt/apar2github at java.net.URL.<init>(URL.java:593) at java.net.URL.<init>(URL.java:490) at java.net.URL.<init>(URL.java:439) at org.kohsuke.github.GitHub.getApiURL(GitHub.java:302) at org.kohsuke.github.Requester._to(Requester.java:280) at org.kohsuke.github.Requester.to(Requester.java:247) at org.kohsuke.github.GitHub.getRepository(GitHub.java:475)

and here is url where it is available:

https://github.XXXX.com/ilmt/apar2github

and code:

GitHub gh = GitHub.connectToEnterpriseWithOAuth(apiUrl, login, oAuth); GHRepository repository = gh.getRepository("ilmt/apar2github"); System.out.println(repository.getName());

and im using 1.95 version

@JonGilmore
Copy link

@m00lecule did you ever resolve this?

@bitwiseman
Copy link
Member

@JonGilmore Are you seeing this?

@m00lecule
Copy link
Author

m00lecule commented Feb 8, 2021

@JonGilmore Yes, I povided wrong url - it should contain /api/

@JonGilmore
Copy link

@bitwiseman yeah - but it was just a dumb mistake that @m00lecule pointed out. I forgot the /api/v3 🤦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants