Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to connect IntelliJ IDEA with a free Jira instance?

My team has a Jira project on Atlassian servers. How can I connect that project with IntelliJ IDEA IDE?

When creating a connection from IntelliJ to Atlassian, I need the server name and username with credentials.

What is in this case the value of the Server URL?

Here is my error log:

com.atlassian.theplugin.commons.remoteapi.RemoteApiException: my_username:[password XX chars]@https://instance.atlassian.net

Login failed
    at com.atlassian.connector.commons.jira.rest.JiraRestSessionImpl.wrapWithRemoteApiException(JiraRestSessionImpl.java:800)
    at com.atlassian.connector.commons.jira.rest.JiraRestSessionImpl.login(JiraRestSessionImpl.java:180)
    at com.atlassian.connector.commons.jira.rest.JiraRestSessionImpl.testConnection(JiraRestSessionImpl.java:762)
    at com.atlassian.connector.commons.jira.JiraRESTFacade2Impl.testServerConnection(JiraRESTFacade2Impl.java:329)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.atlassian.connector.commons.jira.JIRAServerFacade2Impl$1.invoke(JIRAServerFacade2Impl.java:91)
    at com.sun.proxy.$Proxy40.testServerConnection(Unknown Source)
    at com.atlassian.connector.commons.jira.JIRAServerFacade2Impl.testServerConnection(JIRAServerFacade2Impl.java:268)
    at com.atlassian.theplugin.commons.jira.IntelliJJiraServerFacade.testServerConnection(IntelliJJiraServerFacade.java:473)
    at com.atlassian.theplugin.idea.config.serverconfig.ProductConnector.connect(ProductConnector.java:35)
    at com.atlassian.theplugin.ConnectionWrapper.run(ConnectionWrapper.java:63)
Caused by: com.atlassian.jira.rest.client.RestClientException: Login failed
    at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient.invoke(AbstractJerseyRestClient.java:82)
    at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient.postAndParse(AbstractJerseyRestClient.java:140)
    at com.atlassian.jira.rest.client.internal.jersey.JerseySessionRestClient.login(JerseySessionRestClient.java:54)
    at com.atlassian.connector.commons.jira.rest.JiraRestSessionImpl.wrapWithRemoteApiException(JiraRestSessionImpl.java:797)
    ... 13 more
Caused by: com.sun.jersey.api.client.UniformInterfaceException: Client response status: 401
    at com.sun.jersey.api.client.WebResource.handle(WebResource.java:607)
    at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:507)
    at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient$4.call(AbstractJerseyRestClient.java:144)
    at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient.invoke(AbstractJerseyRestClient.java:68)
    ... 16 more
like image 267
Aleksandar Avatar asked Dec 24 '22 21:12

Aleksandar


2 Answers

For everyone looking how to connect JIRA without the Atlassian Connector, there is already a simple build-in solution in IntelliJ IDEA:

IntelliJ IDEA Tasks Server Settings

Normally you don't have to edit the "Search".

And it's also available via the top menu "Tools" -> "Tasks & Contexts" -> "Configure Servers..."

like image 127
RiZKiT Avatar answered Dec 26 '22 11:12

RiZKiT


You can get the url by login into your Jira account via a browser; the Server URL is the the first section of the URL before the '/'.

Example:
https://example.atlassian.net/secure/Dashboard.jspa
Server URL = https://example.atlassian.net

Update:
Also note that Atlassian has stopped support for IDE Connectors since 20 April 2015, developer.atlassian.com/blog/2015/06/… ,so I would consider rather connecting your IntelliJ to Jira thorugh other means, such as GitHub via WebHooks

like image 24
Tom Malinowski Avatar answered Dec 26 '22 12:12

Tom Malinowski