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

Does Not Work With SSH Connections #2

Open
seanelble opened this issue Apr 3, 2020 · 3 comments
Open

Does Not Work With SSH Connections #2

seanelble opened this issue Apr 3, 2020 · 3 comments

Comments

@seanelble
Copy link

We really like this plugin, but we also prefer to use SSH connections to our source control systems. In trying to use this plugin with SSH, we see errors like this:

2020-02-28 14:17:53,069 ERROR [6-DelayedChangeDetectionThread:pool-12-thread-12737] [GitHubService] Failed to update GitHub status
java.net.MalformedURLException: Unknown protocol: ssh

In taking a very quick look at the code, it seems like it may only support HTTPS connections. Is that true, and if so, is there any chance of a patch to fix this?

@IGx89
Copy link

IGx89 commented Jul 14, 2020

👍

Here's the stack trace we're seeing, same issue with git URLs:

2020-07-14 09:15:27,320 ERROR [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-4] [GitHubService] Failed to update GitHub status
java.net.MalformedURLException: no protocol: [email protected]:xxx/yyy.git
	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 tools.redfox.bamboo.github.status.service.GitHubService.getRelativePath(GitHubService.java:91)
	at tools.redfox.bamboo.github.status.service.GitHubService.getGHRepository(GitHubService.java:81)
	at tools.redfox.bamboo.github.status.service.GitHubService.setStatus(GitHubService.java:53)
	at tools.redfox.bamboo.github.status.action.AbstractGitHubStatusAction.pushUpdate(AbstractGitHubStatusAction.java:52)
	at tools.redfox.bamboo.github.status.action.GitHubStatusPostStage.execute(GitHubStatusPostStage.java:49)

@IGx89
Copy link

IGx89 commented Jul 14, 2020

@mprzytulski, would you accept a PR to fix this issue, if I'm able to find a fix myself?

@IGx89
Copy link

IGx89 commented Jul 15, 2020

I ended up working around the issue by switching from a git URL and SSH key to an HTTPS URL and username/password (PAT) combo. It's easy enough to fix the above-mentioned bug, however after looking through the code I saw it would simply error out later due to it being impossible to use an SSH key to make GitHub API calls.

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

2 participants