[root@node1 //]# curl -u root:root -X POST --data @data.txt -H "Content-Type: application/json" http://localhost:8080/jira/rest/api/2/issue/
<html>
<head>
<title>Unauthorized (401)</title>
<!--[if IE]><![endif]-->
<script type="text/javascript">var contextPath = '';</script>
<script>
window.WRM=window.WRM||{};window.WRM._unparsedData=window.WRM._unparsedData||{};
WRM._unparsedData["com.atlassian.plugins.atlassian-plugins-webresource-plugin:context-path.context-path"]="\"\"";
WRM._unparsedData["com.atlassian.plugins.jira-html5-attach-images:jira-html5-attach-images-resources.resource-uris"]="{\"deployJava.html\":\"/s/en_USh97jhf/6337/4/1.5.11/_/download/resources/com.atlassian.plugins.jira-html5-attach-images:jira-html5-attach-images-resources/deployJava.html\",\"clipboard.jar\":\"/s/en_USh97jhf/6337/4/1.5.11/_/download/resources/com.atlassian.plugins.jira-html5-attach-images:jira-html5-attach-images-resources/clipboard.jar\",\"clipboard-legacy.jar\":\"/s/en_USh97jhf/6337/4/1.5.11/_/download/resources/com.atlassian.plugins.jira-html5-attach-images:jira-html5-attach-images-resources/clipboard-legacy.jar\"}";
</script>
<link type="text/css" rel="stylesheet" href="/s/a87ff679a2f3e71d9181a67b7542122c-CDN/en_USh97jhf/6337/4/3/_/download/superbatch/css/batch.css" media="all">
<!--[if lte IE 9]>
<link type="text/css" rel="stylesheet" href="/s/d41d8cd98f00b204e9800998ecf8427e-CDN/en_USh97jhf/6337/4/3/_/download/superbatch/css/batch.css?conditionalComment=lte+IE+9" media="all">
<![endif]-->
<link type="text/css" rel="stylesheet" href="/s/d41d8cd98f00b204e9800998ecf8427e-CDN/en_USh97jhf/6337/4/8cf774b8fab5fc69dfcb4f354abb2aa8/_/download/contextbatch/css/atl.general/batch.css" media="all">
<link type="text/css" rel="stylesheet" href="/s/d41d8cd98f00b204e9800998ecf8427e-CDN/en_USh97jhf/6337/4/8d26f49c7d4aa3dbb86c5bfb0f595b57/_/download/contextbatch/css/jira.general/batch.css" media="all">
<link type="text/css" rel="stylesheet" href="/s/a87ff679a2f3e71d9181a67b7542122c-CDN/en_USh97jhf/6337/4/70e0f36a09c70d4ec7ba475fa61d1407/_/download/contextbatch/css/jira.global/batch.css" media="all">
<script type="text/javascript" src="/s/7b640bac8949aa5154ea9a8109414da4-CDN/en_USh97jhf/6337/4/3/_/download/superbatch/js/batch.js?locale=en-US" ></script>
<script type="text/javascript" src="/s/e7f6f697fc688acc37ab3513fc080ea0-CDN/en_USh97jhf/6337/4/8cf774b8fab5fc69dfcb4f354abb2aa8/_/download/contextbatch/js/atl.general/batch.js?locale=en-US" ></script>
<script type="text/javascript" src="/s/d41d8cd98f00b204e9800998ecf8427e-CDN/en_USh97jhf/6337/4/8d26f49c7d4aa3dbb86c5bfb0f595b57/_/download/contextbatch/js/jira.general/batch.js" ></script>
<script type="text/javascript" src="/s/e0bc9dbb2733d223feed22419efae43f-CDN/en_USh97jhf/6337/4/70e0f36a09c70d4ec7ba475fa61d1407/_/download/contextbatch/js/jira.global/batch.js?locale=en-US" ></script>
<script type="text/javascript" src="/s/618cdcf7eba9a12a6d1169e207b96d15-T/en_USh97jhf/6337/4/1.5/_/download/batch/com.atlassian.administration.atlassian-admin-quicksearch-jira:admin-quicksearch-webresources/com.atlassian.administration.atlassian-admin-quicksearch-jira:admin-quicksearch-webresources.js?locale=en-US" ></script>
<script type="text/javascript" src="/rest/api/1.0/shortcuts/6337/7c50ab94944583add27652c583fe1f6e/shortcuts.js"></script>
<meta name="application-name" content="JIRA" data-name="jira" data-version="6.3.7">
</head>
<body id="jira" class="aui-layout aui-style-default page-type-message" data-version="6.3.7" >
<div class="aui-page-panel"><div class="aui-page-panel-inner">
<section class="aui-page-panel-content">
<header class="aui-page-header"><div class="aui-page-header-inner">
<div class="aui-page-header-main">
<h1>Unauthorized (401)</h1>
</div><!-- .aui-page-header-main -->
</div><!-- .aui-page-header-inner --></header><!-- .aui-page-header -->
<div class="aui-message aui-message-warning warning">
<p>Encountered a <code>&quot;401 - Unauthorized&quot;</code> error while loading this page.</p>
<p><a href="/secure/MyJiraHome.jspa">Go to JIRA home</a></p>
<span class="aui-icon icon-warning"></span></div>
</section><!-- .aui-page-panel-content -->
</div><!-- .aui-page-panel-inner --></div><!-- .aui-page-panel -->
</body>
</html>
[root@node1 //]#
Any ideas?
The same result if to enter code in one row.
curl -D- -u root:root -X POST --data {{ "fields": { "project": { "key": "CI" }, "summary": "REST ye merry gentlemen.","description": "Creating of an issue using project keys and issue type names using the REST API", "issuetype": { "name": "Bug" }}}} -H "Content-Type: application/json" http://localhost:8080/rest/api/2/issue/
<html>
<head>
<title>Unauthorized (401)</title>
<!--[if IE]><![endif]-->
<script type="text/javascript">var contextPath = '';</script>
<script>
window.WRM=window.WRM||{};window.WRM._unparsedData=window.WRM._unparsedData||{};
WRM._unparsedData["com.atlassian.plugins.atlassian-plugins-webresource-plugin:context-path.context-path"]="\"\"";
WRM._unparsedData["com.atlassian.plugins.jira-html5-attach-images:jira-html5-attach-images-resources.resource-uris"]="{\"deployJava.html\":\"/s/en_USh97jhf/6337/4/1.5.11/_/download/resources/com.atlassian.plugins.jira-html5-attach-images:jira-html5-attach-images-resources/deployJava.html\",\"clipboard.jar\":\"/s/en_USh97jhf/6337/4/1.5.11/_/download/resources/com.atlassian.plugins.jira-html5-attach-images:jira-html5-attach-images-resources/clipboard.jar\",\"clipboard-legacy.jar\":\"/s/en_USh97jhf/6337/4/1.5.11/_/download/resources/com.atlassian.plugins.jira-html5-attach-images:jira-html5-attach-images-resources/clipboard-legacy.jar\"}";
</script>
<link type="text/css" rel="stylesheet" href="/s/a87ff679a2f3e71d9181a67b7542122c-CDN/en_USh97jhf/6337/4/3/_/download/superbatch/css/batch.css" media="all">
<!--[if lte IE 9]>
<link type="text/css" rel="stylesheet" href="/s/d41d8cd98f00b204e9800998ecf8427e-CDN/en_USh97jhf/6337/4/3/_/download/superbatch/css/batch.css?conditionalComment=lte+IE+9" media="all">
<![endif]-->
<link type="text/css" rel="stylesheet" href="/s/d41d8cd98f00b204e9800998ecf8427e-CDN/en_USh97jhf/6337/4/8cf774b8fab5fc69dfcb4f354abb2aa8/_/download/contextbatch/css/atl.general/batch.css" media="all">
<link type="text/css" rel="stylesheet" href="/s/d41d8cd98f00b204e9800998ecf8427e-CDN/en_USh97jhf/6337/4/8d26f49c7d4aa3dbb86c5bfb0f595b57/_/download/contextbatch/css/jira.general/batch.css" media="all">
<link type="text/css" rel="stylesheet" href="/s/a87ff679a2f3e71d9181a67b7542122c-CDN/en_USh97jhf/6337/4/70e0f36a09c70d4ec7ba475fa61d1407/_/download/contextbatch/css/jira.global/batch.css" media="all">
<script type="text/javascript" src="/s/7b640bac8949aa5154ea9a8109414da4-CDN/en_USh97jhf/6337/4/3/_/download/superbatch/js/batch.js?locale=en-US" ></script>
<script type="text/javascript" src="/s/e7f6f697fc688acc37ab3513fc080ea0-CDN/en_USh97jhf/6337/4/8cf774b8fab5fc69dfcb4f354abb2aa8/_/download/contextbatch/js/atl.general/batch.js?locale=en-US" ></script>
<script type="text/javascript" src="/s/d41d8cd98f00b204e9800998ecf8427e-CDN/en_USh97jhf/6337/4/8d26f49c7d4aa3dbb86c5bfb0f595b57/_/download/contextbatch/js/jira.general/batch.js" ></script>
<script type="text/javascript" src="/s/e0bc9dbb2733d223feed22419efae43f-CDN/en_USh97jhf/6337/4/70e0f36a09c70d4ec7ba475fa61d1407/_/download/contextbatch/js/jira.global/batch.js?locale=en-US" ></script>
<script type="text/javascript" src="/s/618cdcf7eba9a12a6d1169e207b96d15-T/en_USh97jhf/6337/4/1.5/_/download/batch/com.atlassian.administration.atlassian-admin-quicksearch-jira:admin-quicksearch-webresources/com.atlassian.administration.atlassian-admin-quicksearch-jira:admin-quicksearch-webresources.js?locale=en-US" ></script>
<script type="text/javascript" src="/rest/api/1.0/shortcuts/6337/7c50ab94944583add27652c583fe1f6e/shortcuts.js"></script>
<meta name="application-name" content="JIRA" data-name="jira" data-version="6.3.7">
</head>
<body id="jira" class="aui-layout aui-style-default page-type-message" data-version="6.3.7" >
<div class="aui-page-panel"><div class="aui-page-panel-inner">
<section class="aui-page-panel-content">
<header class="aui-page-header"><div class="aui-page-header-inner">
<div class="aui-page-header-main">
<h1>Unauthorized (401)</h1>
</div><!-- .aui-page-header-main -->
</div><!-- .aui-page-header-inner --></header><!-- .aui-page-header -->
<div class="aui-message aui-message-warning warning">
<p>Encountered a <code>&quot;401 - Unauthorized&quot;</code> error while loading this page.</p>
<p><a href="/secure/MyJiraHome.jspa">Go to JIRA home</a></p>
<span class="aui-icon icon-warning"></span></div>
</section><!-- .aui-page-panel-content -->
</div><!-- .aui-page-panel-inner --></div><!-- .aui-page-panel -->
</body>
</html>WTF?
credentials for root are correct!!!!