go-jira / jira

simple jira command line client in Go
Apache License 2.0
2.68k stars 328 forks source link

JSON parse error, code spitout when using API token auth #217

Open bowernite opened 6 years ago

bowernite commented 6 years ago

Whenever I try to use any command that hits anything on the API (using the API token auth), the CLI:

  1. Prompts me for my auth token
  2. Prompts me again for my auth token
  3. Gives me a JSON parse error
  4. Spits out a wall of code at me, and doesn't give me the information the command should

Here is an example with the jira view command:

> jira view 5555
? Jira API-Token [brett]:  [? for help] ********************
Jira API-Token [brett]:  [? for help] ********************

usage: jira view [<flags>] <ISSUE>

Prints issue details

Global flags:
      --help                   Show context-sensitive help
                               (also try --help-long and
                               --help-man).
  -v, --verbose ...            Increase verbosity for
                               debugging
  -e, --endpoint=ENDPOINT      Base URI to use for Jira
  -k, --insecure               Disable TLS certificate
                               verification
  -Q, --quiet                  Suppress output to console
      --unixproxy=UNIXPROXY    Path for a unix-socket proxy
      --socksproxy=SOCKSPROXY  Address for a socks proxy
  -u, --user=USER              user name used within the
                               Jira service
      --login=LOGIN            login name that corresponds
                               to the user used for
                               authentication

Optional flags:
  -b, --browse                 Open issue(s) in browser
                               after operation
  -t, --template=TEMPLATE      Template to use for output
      --gjq=GJQ                GJSON Query to filter output,
                               see https://goo.gl/iaYwJ5
      --expand=EXPAND ...      field to expand for the issue
      --field=FIELD ...        field to return for the issue
      --property=PROPERTY ...  property to return for issue

Args:
  <ISSUE>  issue id to view

ERROR Invalid Usage: JSON Parse Error: invalid character '<' looking for beginning of value from "\n\n\n\n\n\n\n\n\n\n<html>\n\n<head>\n    <title>Unauthorized (401)</title>\n    \n\n\n\n\n\n<!--[if IE]><![endif]-->\n<script type=\"text/javascript\" >\n    var contextPath = '';\n    var DeferScripts = { deferState: 'disabled' };\n</script>\n<script>\nwindow.WRM=window.WRM||{};window.WRM._unparsedData=window.WRM._unparsedData||{};window.WRM._unparsedErrors=window.WRM._unparsedErrors||{};\nWRM._unparsedData[\"com.atlassian.plugins.atlassian-plugins-webresource-plugin:context-path.context-path\"]=\"\\\"\\\"\";\nWRM._unparsedData[\"com.atlassian.plugins.atlassian-plugins-webresource-rest:curl.cross-origin-resources\"]=\"false\";\nWRM._unparsedData[\"jira.webresources:feature-flags.feature-flag-data\"]=\"{\\\"enabled-feature-keys\\\":[\\\"jira.plugin.devstatus.smartcommits.dvcs.enabled\\\",\\\"nps.survey.inline.dialog\\\",\\\"com.atlassian.jira.plugins.mail.internal.enabled\\\",\\\"sd.new.settings.sidebar.location\\\",\\\"atlassian.rest.xsrf.legacy.enabled\\\",\\\"dvcs.connector.smartcommits.disabled\\\",\\\"unified.usermanagement\\\",\\\"com.atlassian.jira.projects.issuenavigator\\\",\\\"jira.issue.search.jql.indexprimary.enabled\\\",\\\"jira.issue.search.api.indexprimary.enabled\\\",\\\"com.atlassian.jira.projects.issue.summary.vignettes\\\",\\\"atlassian.aui.raphael.disabled\\\",\\\"fusion.dvcs.use_amq_for_executors.enabled\\\",\\\"connect.dependencies.allow\\\",\\\"com.atlassian.jira.config.CoreFeatures.PERMISSIONS_MANAGED_BY_UM\\\",\\\"com.atlassian.jira.projects.ProjectCentricNavigation.Switch\\\",\\\"com.atlassian.jira.config.CoreFeatures.ON_DEMAND\\\",\\\"atlassian.plugin.aci.enabled\\\",\\\"com.atlassian.jira.agile.darkfeature.kanplan\\\",\\\"connect.no-applinks\\\",\\\"com.atlassian.jira.agile.darkfeature.burnupchart\\\",\\\"fusion.dvcs.use_amq_to_invoke_sync.enabled\\\",\\\"com.atlassian.portfolio.classicPlans.sunset\\\",\\\"com.atlassian.rm.portfolio.vertigo.issueloading.Database\\\",\\\"jira.baseurl.cdn.enabled\\\",\\\"fusion.bitbucket.rebrand\\\",\\\"com.atlassian.portfolio.integrations.ClassicPlans.disabled\\\",\\\"connect.authentication.oauth2.impersonation\\\",\\\"sd.email.mailbox.poppy.migration.poppyonly.enabled\\\",\\\"dvcs.connector.repositorydao.ao.enabled\\\",\\\"fusion.devstatus.devsummary.customfield.jql.enabled\\\"],\\\"feature-flag-states\\\":{\\\"jira.feature.flag.board.issue.modal.labs\\\":true,\\\"jira.mail.default.mailstore.polling\\\":true,\\\"com.atlassian.jira.plugins.mail.size.check\\\":true,\\\"jira.instrumentation.laas\\\":false,\\\"jira.feature.rest.single.step.avatar.upload\\\":true,\\\"jira.login.useBasicAuthFilter\\\":true,\\\"jira.ondemand.maintain.trusted.apps\\\":true,\\\"jira.mail.fake.default.mail.server\\\":false,\\\"jira.issue.search.jql.anonymize\\\":true,\\\"com.atlassian.jira.plugins.mail.internal\\\":false,\\\"com.atlassian.jira.feature.flag.for.TestFeatureFlagResource\\\":false,\\\"com.atlassian.jira.plugins.mail.amq\\\":true,\\\"jira.feature.flag.board.polling\\\":true,\\\"issue.collector.cache.limiter\\\":true}}\";\nWRM._unparsedData[\"jira.webresources:simplified-ux-feature-flags.feature-flag-data\"]=\"{\\\"isBacklogViewPlanSprintXflowEnabled\\\":true,\\\"isGlobalSidebarEnabled\\\":true,\\\"isJraCloud69830PreventingVerifyPopServerConnectionToLeakInfo\\\":true,\\\"isAdg3NewProjectAvatarsEnabled\\\":true,\\\"isUserDiscoveryEnabled\\\":false,\\\"isGlobalSettingsLandingPageEnable\\\":false,\\\"isNewExperienceMenuEnabled\\\":false,\\\"isOptinDismissed\\\":false,\\\"isFiltersDirectoryVersion2Enabled\\\":true,\\\"isProjectDirectoryVersion2Enabled\\\":true,\\\"isAdg3FeatureStateCheckerEnabled\\\":false,\\\"isStickyQuickfilterFixEnabled\\\":true,\\\"isUserOptedInSkipped\\\":false,\\\"isAgilityProjectFeaturesAllowed\\\":true,\\\"isAdg3StylesEnabled\\\":true,\\\"isGinFilterDetailsDialogEnabled\\\":false,\\\"isChangeboardingOptional\\\":false,\\\"isAdg3PINEnabled\\\":false,\\\"isUnusedUserPreferencesHidden\\\":true,\\\"isPeopleProfileEnabled\\\":true,\\\"isProjectLandingEnabled\\\":false,\\\"isProjectsAdminVersion2Enabled\\\":true,\\\"isAdg3ProfilecardEnabled\\\":false,\\\"isGraduationWarningVisible\\\":false,\\\"isVersionsPageOn\\\":true,\\\"isImportIssueButtonEnabled\\\":true,\\\"isEvalHubEnabledInJSW\\\":false,\\\"isXflowPagesEnabled\\\":true,\\\"isOnboardingProjectSwitcherEnabled\\\":true,\\\"isLabsEnabled\\\":true,\\\"isOptOutEnabled\\\":false,\\\"isUserOptedIn\\\":false,\\\"isAdg3ModeOn\\\":true,\\\"isProjectsAdminEnabled\\\":true,\\\"isOptInEnabled\\\":false}\";\nWRM._unparsedData[\"jira.webresources:default-comment-security-level.DefaultCommentSecurityLevelHelpLink\"]=\"{\\\"extraClasses\\\":\\\"default-comment-level-help\\\",\\\"title\\\":\\\"Commenting on an Issue\\\",\\\"url\\\":\\\"https://confluence.atlassian.com/display/JIRACORECLOUD/Editing+and+collaborating+on+issues#Editingandcollaboratingonissues-addcommentsCommentingonissues\\\",\\\"isLocal\\\":false}\";\nWRM._unparsedData[\"com.atlassian.jira.jira-client-analytics-plugin:analytics-context-provider.client-analytic-descriptors\"]=\"{\\\"analyticsResource\\\":{\\\"jira-core\\\":{\\\"events\\\":{\\\"issue.comment.added\\\":{\\\"trigger\\\":\\\"click #issue-comment-add-submit\\\",\\\"properties\\\":{\\\"comment-length\\\":\\\"value.length #issue-comment-add #comment\\\"}}}}},\\\"tenantId\\\":\\\"e4fa231b-5f6e-48a7-a81f-53d840b1da17\\\",\\\"env\\\":\\\"prod\\\"}\";\nWRM._unparsedData[\"jira.webresources:key-commands.shortcuts\"]=\"[{\\\"moduleKey\\\":\\\"go-to-dashboard-kb-shortcut\\\",\\\"keys\\\":[[\\\"g\\\",\\\"d\\\"]],\\\"context\\\":\\\"global\\\",\\\"op\\\":\\\"goTo\\\",\\\"param\\\":\\\"/secure/Dashboard.jspa\\\"},{\\\"moduleKey\\\":\\\"browse-project-kb-shortcut\\\",\\\"keys\\\":[[\\\"g\\\",\\\"p\\\"]],\\\"context\\\":\\\"global\\\",\\\"op\\\":\\\"execute\\\",\\\"param\\\":\\\"var elem = jQuery(\\\\\\\"#browse_link\\\\\\\");\\\\n                if (elem.length \\u003e 0) {\\\\n                    window.location.href = elem.attr(\\\\\\\"href\\\\\\\");\\\\n                }\\\"},{\\\"moduleKey\\\":\\\"issue-navigator-kb-shortcut\\\",\\\"keys\\\":[[\\\"g\\\",\\\"i\\\"]],\\\"context\\\":\\\"global\\\",\\\"op\\\":\\\"execute\\\",\\\"param\\\":\\\"var elem = jQuery(\\\\\\\"#find_link\\\\\\\");\\\\n                if (elem.length \\u003e 0) {\\\\n                    window.location.href = elem.attr(\\\\\\\"href\\\\\\\");\\\\n                }\\\"},{\\\"moduleKey\\\":\\\"admin.quicksearch.dialog.shortcut\\\",\\\"keys\\\":[[\\\"g\\\",\\\"g\\\"]],\\\"context\\\":\\\"global\\\",\\\"op\\\":\\\"execute\\\",\\\"param\\\":\\\"if (AJS.Meta.get(\\'admin-quicksearch-show\\')) {\\\\n              JIRA.Shifter.show(\\'admin\\');\\\\n            }\\\"},{\\\"moduleKey\\\":\\\"quicksearch\\\",\\\"keys\\\":[[\\\"/\\\"]],\\\"context\\\":\\\"global\\\",\\\"op\\\":\\\"moveToAndFocus\\\",\\\"param\\\":\\\"#quickSearchInput, #admin-quick-nav-field\\\"},{\\\"moduleKey\\\":\\\"create.issue\\\",\\\"keys\\\":[[\\\"c\\\"]],\\\"context\\\":\\\"global\\\",\\\"op\\\":\\\"moveToAndClick\\\",\\\"param\\\":\\\"#header .create-issue\\\"},{\\\"moduleKey\\\":\\\"shifter\\\",\\\"keys\\\":[[\\\".\\\"]],\\\"context\\\":\\\"global\\\",\\\"op\\\":\\\"execute\\\",\\\"param\\\":\\\"JIRA.Shifter.show();\\\"},{\\\"moduleKey\\\":\\\"help\\\",\\\"keys\\\":[[\\\"?\\\"]],\\\"context\\\":\\\"global\\\",\\\"op\\\":\\\"click\\\",\\\"param\\\":\\\"#keyshortscuthelp\\\"}]\";\nWRM._unparsedData[\"com.atlassian.plugins.atlassian-connect-plugin:dialog-options.data\"]=\"{\\\"allJsVersion\\\":\\\"1.2.21\\\",\\\"dialogOptions\\\":{},\\\"inlineDialogOptions\\\":{},\\\"dialogModules\\\":{\\\"stspg-jira-ops\\\":{\\\"login-dialog\\\":{\\\"cacheable\\\":false,\\\"options\\\":{\\\"height\\\":\\\"700px\\\",\\\"chrome\\\":false,\\\"header\\\":{\\\"value\\\":\\\"Statuspage Login\\\"},\\\"width\\\":\\\"600px\\\"},\\\"key\\\":\\\"login-dialog\\\"},\\\"create-incident-dialog\\\":{\\\"cacheable\\\":false,\\\"options\\\":{\\\"height\\\":\\\"100%\\\",\\\"chrome\\\":false,\\\"header\\\":{\\\"value\\\":\\\"Create Incident\\\"},\\\"width\\\":\\\"100%\\\"},\\\"key\\\":\\\"create-incident-dialog\\\"},\\\"update-incident-dialog\\\":{\\\"cacheable\\\":false,\\\"options\\\":{\\\"height\\\":\\\"100%\\\",\\\"chrome\\\":false,\\\"header\\\":{\\\"value\\\":\\\"Update Incident\\\"},\\\"width\\\":\\\"100%\\\"},\\\"key\\\":\\\"update-incident-dialog\\\"},\\\"project-configure-dialog\\\":{\\\"cacheable\\\":false,\\\"options\\\":{\\\"height\\\":\\\"700px\\\",\\\"chrome\\\":false,\\\"header\\\":{\\\"value\\\":\\\"Configure\\\"},\\\"width\\\":\\\"600px\\\"},\\\"key\\\":\\\"project-configure-dialog\\\"},\\\"ops-setup-flow\\\":{\\\"cacheable\\\":false,\\\"options\\\":{\\\"height\\\":\\\"700px\\\",\\\"chrome\\\":false,\\\"header\\\":{\\\"value\\\":\\\"Configure\\\"},\\\"width\\\":\\\"600px\\\"},\\\"key\\\":\\\"ops-setup-flow\\\"},\\\"change-project-statuspage\\\":{\\\"cacheable\\\":false,\\\"options\\\":{\\\"height\\\":\\\"700px\\\",\\\"chrome\\\":false,\\\"header\\\":{\\\"value\\\":\\\"Change Project Statuspage\\\"},\\\"width\\\":\\\"600px\\\"},\\\"key\\\":\\\"change-project-statuspage\\\"}},\\\"com.atlassian.jira.chat\\\":{\\\"stride-create-room-dialog\\\":{\\\"cacheable\\\":false,\\\"options\\\":{\\\"height\\\":\\\"650\\\",\\\"header\\\":{\\\"value\\\":\\\"Title\\\"},\\\"width\\\":\\\"548\\\"},\\\"key\\\":\\\"stride-create-room-dialog\\\"}}}}\";\nWRM._unparsedData[\"com.atlassian.plugins.atlassian-connect-plugin:jira-date-picker-widget.config\"]=\"{\\\"dateFormat\\\":\\\"%e/%b/%y\\\",\\\"dateTimeFormat\\\":\\\"%e/%b/%y %I:%M %p\\\",\\\"timeFormat\\\":\\\"12\\\",\\\"firstDay\\\":1,\\\"useISO8601WeekNumbers\\\":false}\";\nWRM._unparsedData[\"com.atlassian.product.fabric.pf-jira-confluence-integration-plugin:app-switcher-initial-resources.cloud-id\"]=\"\\\"e4fa231b-5f6e-48a7-a81f-53d840b1da17\\\"\";\nWRM._unparsedData[\"com.atlassian.product.fabric.pf-jira-confluence-integration-plugin:app-switcher-initial-resources.is-anonymous\"]=\"true\";\nWRM._unparsedData[\"jira.webresources:dateFormatProvider.dateFormat\"]=\"{\\\"meridiem\\\":[\\\"AM\\\",\\\"PM\\\"],\\\"eras\\\":[\\\"BC\\\",\\\"AD\\\"],\\\"months\\\":[\\\"January\\\",\\\"February\\\",\\\"March\\\",\\\"April\\\",\\\"May\\\",\\\"June\\\",\\\"July\\\",\\\"August\\\",\\\"September\\\",\\\"October\\\",\\\"November\\\",\\\"December\\\"],\\\"monthsShort\\\":[\\\"Jan\\\",\\\"Feb\\\",\\\"Mar\\\",\\\"Apr\\\",\\\"May\\\",\\\"Jun\\\",\\\"Jul\\\",\\\"Aug\\\",\\\"Sep\\\",\\\"Oct\\\",\\\"Nov\\\",\\\"Dec\\\"],\\\"weekdaysShort\\\":[\\\"Sun\\\",\\\"Mon\\\",\\\"Tue\\\",\\\"Wed\\\",\\\"Thu\\\",\\\"Fri\\\",\\\"Sat\\\"],\\\"weekdays\\\":[\\\"Sunday\\\",\\\"Monday\\\",\\\"Tuesday\\\",\\\"Wednesday\\\",\\\"Thursday\\\",\\\"Friday\\\",\\\"Saturday\\\"]}\";\nWRM._unparsedData[\"com.atlassian.servicedesk.frontend-webpack-plugin:data-provider.webpack-meta\"]=\"{\\\"locale\\\":\\\"en-US\\\",\\\"publicPath\\\":\\\"//d11od6nl13tgep.cloudfront.net/atl-vertigo--shard-jira-prod-us-7--2--jres.atlassian.net/s/5f5hmk/b/22/1001.0.0-SNAPSHOT/_/download/resources/com.atlassian.servicedesk.frontend-webpack-plugin:webpack-async-chunks/\\\"}\";\nWRM._unparsedData[\"com.atlassian.applinks.applinks-plugin:applinks-common-exported.applinks-help-paths\"]=\"{\\\"entries\\\":{\\\"applinks.docs.root\\\":\\\"https://confluence.atlassian.com/display/APPLINKS-070/\\\",\\\"applinks.docs.diagnostics.troubleshoot.sslunmatched\\\":\\\"SSL+and+application+link+troubleshooting+guide\\\",\\\"applinks.docs.diagnostics.troubleshoot.oauthsignatureinvalid\\\":\\\"OAuth+troubleshooting+guide\\\",\\\"applinks.docs.diagnostics.troubleshoot.oauthtimestamprefused\\\":\\\"OAuth+troubleshooting+guide\\\",\\\"applinks.docs.delete.entity.link\\\":\\\"Create+links+between+projects\\\",\\\"applinks.docs.adding.application.link\\\":\\\"Link+Atlassian+applications+to+work+together\\\",\\\"applinks.docs.administration.guide\\\":\\\"Application+Links+Documentation\\\",\\\"applinks.docs.oauth.security\\\":\\\"OAuth+security+for+application+links\\\",\\\"applinks.docs.troubleshoot.application.links\\\":\\\"Troubleshoot+application+links\\\",\\\"applinks.docs.diagnostics.troubleshoot.unknownerror\\\":\\\"Network+and+connectivity+troubleshooting+guide\\\",\\\"applinks.docs.configuring.auth.trusted.apps\\\":\\\"Configuring+Trusted+Applications+authentication+for+an+application+link\\\",\\\"applinks.docs.diagnostics.troubleshoot.authlevelunsupported\\\":\\\"OAuth+troubleshooting+guide\\\",\\\"applinks.docs.diagnostics.troubleshoot.ssluntrusted\\\":\\\"SSL+and+application+link+troubleshooting+guide\\\",\\\"applinks.docs.diagnostics.troubleshoot.unknownhost\\\":\\\"Network+and+connectivity+troubleshooting+guide\\\",\\\"applinks.docs.delete.application.link\\\":\\\"Link+Atlassian+applications+to+work+together\\\",\\\"applinks.docs.link.applications\\\":\\\"Link+Atlassian+applications+to+work+together\\\",\\\"applinks.docs.diagnostics.troubleshoot.oauthproblem\\\":\\\"OAuth+troubleshooting+guide\\\",\\\"applinks.docs.diagnostics.troubleshoot.migration\\\":\\\"Update+application+links+to+use+OAuth\\\",\\\"applinks.docs.relocate.application.link\\\":\\\"Link+Atlassian+applications+to+work+together\\\",\\\"applinks.docs.administering.entity.links\\\":\\\"Create+links+between+projects\\\",\\\"applinks.docs.upgrade.application.link\\\":\\\"OAuth+security+for+application+links\\\",\\\"applinks.docs.diagnostics.troubleshoot.connectionrefused\\\":\\\"Network+and+connectivity+troubleshooting+guide\\\",\\\"applinks.docs.configuring.auth.oauth\\\":\\\"OAuth+security+for+application+links\\\",\\\"applinks.docs.insufficient.remote.permission\\\":\\\"OAuth+security+for+application+links\\\",\\\"applinks.docs.configuring.application.link.auth\\\":\\\"OAuth+security+for+application+links\\\",\\\"applinks.docs.diagnostics\\\":\\\"Application+links+diagnostics\\\",\\\"applinks.docs.configured.authentication.types\\\":\\\"OAuth+security+for+application+links\\\",\\\"applinks.docs.adding.entity.link\\\":\\\"Create+links+between+projects\\\",\\\"applinks.docs.diagnostics.troubleshoot.unexpectedresponse\\\":\\\"Network+and+connectivity+troubleshooting+guide\\\",\\\"applinks.docs.configuring.auth.basic\\\":\\\"Configuring+Basic+HTTP+Authentication+for+an+Application+Link\\\",\\\"applinks.docs.diagnostics.troubleshoot.authlevelmismatch\\\":\\\"OAuth+troubleshooting+guide\\\"}}\";\nWRM._unparsedData[\"com.atlassian.applinks.applinks-plugin:applinks-common-exported.applinks-types\"]=\"{\\\"crowd\\\":\\\"Crowd\\\",\\\"confluence\\\":\\\"Confluence\\\",\\\"remote.plugin.container\\\":\\\"Atlassian Connect\\\",\\\"fecru\\\":\\\"FishEye / Crucible\\\",\\\"stash\\\":\\\"Stash\\\",\\\"jira\\\":\\\"JIRA\\\",\\\"bamboo\\\":\\\"Bamboo\\\",\\\"generic\\\":\\\"Generic Application\\\"}\";\nWRM._unparsedData[\"com.atlassian.applinks.applinks-plugin:applinks-common-exported.entity-types\"]=\"{\\\"singular\\\":{\\\"fecru.project\\\":\\\"Crucible Project\\\",\\\"fecru.repository\\\":\\\"FishEye Repository\\\",\\\"stash.project\\\":\\\"Stash Project\\\",\\\"generic.entity\\\":\\\"Generic Project\\\",\\\"confluence.space\\\":\\\"Confluence Space\\\",\\\"bamboo.project\\\":\\\"Bamboo Project\\\",\\\"jira.project\\\":\\\"JIRA Project\\\"},\\\"plural\\\":{\\\"fecru.project\\\":\\\"Crucible Projects\\\",\\\"fecru.repository\\\":\\\"FishEye Repositories\\\",\\\"stash.project\\\":\\\"Stash Projects\\\",\\\"generic.entity\\\":\\\"Generic Projects\\\",\\\"confluence.space\\\":\\\"Confluence Spaces\\\",\\\"bamboo.project\\\":\\\"Bamboo Projects\\\",\\\"jira.project\\\":\\\"JIRA Projects\\\"}}\";\nWRM._unparsedData[\"com.atlassian.applinks.applinks-plugin:applinks-common-exported.authentication-types\"]=\"{\\\"com.atlassian.applinks.api.auth.types.BasicAuthenticationProvider\\\":\\\"Basic Access\\\",\\\"com.atlassian.applinks.api.auth.types.CorsAuthenticationProvider\\\":\\\"CORS\\\",\\\"com.atlassian.applinks.api.auth.types.TrustedAppsAuthenticationProvider\\\":\\\"Trusted Applications\\\",\\\"com.atlassian.applinks.api.auth.types.OAuthAuthenticationProvider\\\":\\\"OAuth\\\",\\\"com.atlassian.applinks.api.auth.types.TwoLeggedOAuthAuthenticationProvider\\\":\\\"OAuth\\\",\\\"com.atlassian.applinks.api.auth.types.TwoLeggedOAuthWithImpersonationAuthenticationProvider\\\":\\\"OAuth\\\"}\";\nWRM._unparsedData[\"com.atlassian.crowd.user-provisioning-vertigo-plugin:create-users-resources.isSiteAdmin\"]=\"false\";\nWRM._unparsedData[\"jira.webresources:avatar-picker.data\"]=\"{\\\"isEnabled\\\":true,\\\"url\\\":\\\"/plugins/servlet/redirectToProfile?target=edit-avatar\\\"}\";\nWRM._unparsedData[\"com.atlassian.jira.jira-header-plugin:dismissedFlags.flags\"]=\"{\\\"dismissed\\\":[]}\";\nWRM._unparsedData[\"com.atlassian.jira.ui.selector:ui-selector.uri-override\"]=\"{\\\"uri\\\":\\\"\\\"}\";\nWRM._unparsedData[\"com.atlassian.servicedesk.core-ui:util-help-links.help-links\"]=\"{\\\"help\\\":{\\\"sla.settings\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/setting+up+slas\\\",\\\"email.settings\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Receiving+requests+by+email\\\",\\\"request.type\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/configuring+request+types+and+workflows\\\",\\\"servicedesk.organizations\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Setting+up+service+desk+users#Settingupservicedeskusers-manageorgsManageorganizations\\\",\\\"managing.queues\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Setting+up+queues+for+your+team\\\",\\\"servicedesk.users\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Setting+up+service+desk+users\\\",\\\"email.setup\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Receiving+requests+by+email\\\",\\\"documentation.home\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Jira+Service+Desk+Cloud+documentation\\\",\\\"multi.language.portal\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Translating+your+customer+portal+and+supporting+multiple+languages\\\",\\\"default\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/\\\",\\\"portal.settings\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/best+practices+for+designing+the+customer+portal\\\",\\\"setting.up.reports\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Setting+up+service+desk+reports\\\",\\\"getting.started.agent\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Getting+started+for+service+desk+agents\\\",\\\"queues.setup\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/setting+up+queues+for+your+team\\\",\\\"request.settings.help.bubble\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Managing+access+to+your+service+desk\\\",\\\"email.settings.suitablerequest\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Receiving+requests+by+email#Receivingrequestsbyemail-suitablerequest\\\",\\\"servicedesk.software.teams\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/best+practices+for+software+teams+using+jira+service+desk\\\",\\\"create.space.help\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Serving+customers+with+a+knowledge+base#serving-customers-with-a-knowledge-base-createpermission\\\",\\\"email.settings.troubleshooting\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Troubleshooting+issues+with+the+email+channel\\\",\\\"admin.notifications.config\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Managing+service+desk+notifications\\\",\\\"troubleshoot.requesttype\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Troubleshooting+issues+with+request+types\\\",\\\"approvals.configuration\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Configuring+JIRA+Service+Desk+approvals\\\",\\\"public.signup\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Configuring+public+signup\\\",\\\"knowledge.base\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Serving+customers+with+a+knowledge+base\\\",\\\"resolve.permission.scheme.errors\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Resolving+permission+scheme+errors\\\",\\\"getting.started\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Getting+started+with+JIRA+Service+Desk\\\",\\\"invite.customers\\\":\\\"https://confluence.atlassian.com/display/SERVICEDESKCLOUD/Managing+access+to+your+service+desk\\\"},\\\"kb\\\":{\\\"default\\\":\\\"https://confluence.atlassian.com/display/SDKB/\\\",\\\"legacytransition\\\":\\\"https://confluence.atlassian.com/display/SDKB/Replacing+legacy+automatic+transitions+with+automation+rules\\\",\\\"umtroubleshoot\\\":\\\"https://confluence.atlassian.com/display/SDKB/Troubleshooting+issues+with+service+desk+user+management\\\"}}\";\nWRM._unparsedData[\"com.atlassian.servicedesk.core-ui:util-base-url.base-url\"]=\"\\\"https://akitabox.atlassian.net\\\"\";\nWRM._unparsedData[\"com.atlassian.jira.ext.calendar:tipDataProvider.tip\"]=\"{\\\"suppressTip\\\":false}\";\nWRM._unparsedData[\"com.atlassian.jira.jira-tzdetect-plugin:tzdetect-lib.time-zone-data\"]=\"{\\\"julyOffset\\\":-18000000,\\\"tzid\\\":\\\"America/Chicago\\\",\\\"tzname\\\":\\\"(GMT-06:00) Chicago\\\",\\\"janOffset\\\":-21600000,\\\"enabled\\\":false}\";\nWRM._unparsedData[\"com.atlassian.labs.hipchat.hipchat-for-jira-plugin:resources-init.is-hipchat-enabled-data-provider\"]=\"false\";\nWRM._unparsedData[\"jira.webresources:user-message-flags.adminLockout\"]=\"{}\";\nWRM._unparsedData[\"com.atlassian.plugins.helptips.jira-help-tips:help-tip-manager.JiraHelpTipData\"]=\"{\\\"anonymous\\\":true}\";\nif(window.WRM._dataArrived)window.WRM._dataArrived();</script>\n<link type=\"text/css\" rel=\"stylesheet\" href=\"//d11od6nl13tgep.cloudfront.net/atl-vertigo--shard-jira-prod-us-7--2--jres.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-CDN/5f5hmk/b/22/4f9a9a37cb0ca9d1c8a5039ae4ca1f68/_/download/contextbatch/css/_super/batch.css?adg3Enabled=true&amp;relative-url=true\" data-wrm-key=\"_super\" data-wrm-batch-type=\"context\" media=\"all\">\n<link type=\"text/css\" rel=\"stylesheet\" href=\"//d11od6nl13tgep.cloudfront.net/atl-vertigo--shard-jira-prod-us-7--2--jres.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-CDN/5f5hmk/b/22/b87cfab8ecaf40009f2bf2fc98d84819/_/download/contextbatch/css/atl.general,jira.general,atl.global,jira.global,-_super/batch.css?adg3Enabled=true&amp;agile_global_admin_condition=true&amp;devsummary=true&amp;globalSidebarEnabled=true&amp;jag=true&amp;relative-url=true&amp;sd_operational=true\" data-wrm-key=\"atl.general,jira.general,atl.global,jira.global,-_super\" data-wrm-batch-type=\"context\" media=\"all\">\n<script type=\"text/javascript\" src=\"//d11od6nl13tgep.cloudfront.net/atl-vertigo--shard-jira-prod-us-7--2--jres.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-CDN/5f5hmk/b/22/4fb454e43c5f3e6a698da579bc725d92/_/download/contextbatch/js/_super/batch.js?adg3Enabled=true&amp;locale=en-US\" data-wrm-key=\"_super\" data-wrm-batch-type=\"context\" data-initially-rendered></script>\n<script type=\"text/javascript\" src=\"//d11od6nl13tgep.cloudfront.net/atl-vertigo--shard-jira-prod-us-7--2--jres.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-CDN/5f5hmk/b/22/28f78984c7a641c150e1445071bee4e7/_/download/contextbatch/js/atl.general,jira.general,atl.global,jira.global,-_super/batch.js?adg3Enabled=true&amp;agile_global_admin_condition=true&amp;devsummary=true&amp;globalSidebarEnabled=true&amp;jag=true&amp;locale=en-US&amp;sd_operational=true\" data-wrm-key=\"atl.general,jira.general,atl.global,jira.global,-_super\" data-wrm-batch-type=\"context\" data-initially-rendered></script>\n<script type=\"text/javascript\" src=\"//d11od6nl13tgep.cloudfront.net/atl-vertigo--shard-jira-prod-us-7--2--jres.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-CDN/5f5hmk/b/22/2bff7534406abf77f6136255b60cd19a/_/download/batch/com.pyxis.greenhopper.jira:gh-create-board-adg3-no-condition/com.pyxis.greenhopper.jira:gh-create-board-adg3-no-condition.js\" data-wrm-key=\"com.pyxis.greenhopper.jira:gh-create-board-adg3-no-condition\" data-wrm-batch-type=\"resource\" data-initially-rendered></script>\n<link type=\"text/css\" rel=\"stylesheet\" href=\"//d11od6nl13tgep.cloudfront.net/akitabox.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-CDN/5f5hmk/b/22/347c0dea940a9d51b1a24ffbfa8298ee/_/download/jira-lf-contextbatch/css/jira.global.look-and-feel,-_super/batch.css?adg3Enabled=true&amp;relative-url=true\" data-wrm-key=\"jira.global.look-and-feel,-_super\" data-wrm-batch-type=\"context\" media=\"all\">\n\n    <meta name=\"application-name\" content=\"JIRA\" data-name=\"jira\" data-version=\"1001.0.0-SNAPSHOT\">\n</head>\n<body id=\"jira\" class=\"aui-layout aui-style-default page-type-message\"  data-version=\"1001.0.0-SNAPSHOT\" >\n    <div class=\"aui-page-panel\"><div class=\"aui-page-panel-inner\">\n            <section class=\"aui-page-panel-content\">\n                    <header class=\"aui-page-header\"><div class=\"aui-page-header-inner\">\n                            <div class=\"aui-page-header-main\">\n                                    <h1>Unauthorized (401)</h1>\n                                </div><!-- .aui-page-header-main -->\n                        </div><!-- .aui-page-header-inner --></header><!-- .aui-page-header -->\n                    <div class=\"aui-message aui-message-warning warning\">\n                            <p>Encountered a <code>&quot;401 - Unauthorized&quot;</code> error while loading this page.</p>\n                            <p><a href=\"/secure/MyJiraHome.jspa\">Go to Jira home</a></p>\n                   </div>\n                </section><!-- .aui-page-panel-content -->\n        </div><!-- .aui-page-panel-inner --></div><!-- .aui-page-panel -->\n</body>\n</html>\n"
ccstolley commented 6 years ago

You might want to check that your config.yml contains:

user: brett@<your domain>

I got this same error because JIRA was expecting my full email address.

tomgoren commented 6 years ago

@ccstolley this fixed it for me. Even though I was passing the --user and --login parameters, only when added to the config.yml alongside the token stored in an environment variable did this work.

Thanks!