Atlassian Connect Express:凭证在连接时被拒绝-ace.atlassian.net

Atlassian Connect Express: Credentials rejected at connect-ace.atlassian.net

我正在评估 atlassian-connect-express 并刚刚创建了一个应用程序 使用 "atlassian-connect new" 的样板文件,然后通过 ngrok 部署它 到我的 Jira 开发帐户。

效果很好,但是当我尝试将文件 "credentials.json" 与 我的帐户数据,插件以错误消息开头:

Failed to register with host https‍://michael%40...:[My password]@connect-ace.atlassian.net (401)
Add-on not registered; no compatible hosts detected

当我转到 url connect-ace.atlassian.net

时收到类似的消息

这是我的 atlassian-connect.json

{
    "key": "my-add-on",
    "name": "Ping Pong",
    "description": "My very first add-on",
    "vendor": {
        "name": "Angry Nerds",
        "url": "https://www.atlassian.com/angrynerds"
    },
    "baseUrl": "https://xxxxxxx.ngrok.io",
    "links": {
        "self": "https://xxxxxxxx.ngrok.io/atlassian-connect.json",
        "homepage": "https://xxxxxxx.ngrok.io/atlassian-connect.json"
    },
    "authentication": {
        "type": "jwt"
    },
    "lifecycle": {
        "installed": "/installed"
    },
    "scopes": [
        "READ"
    ],
    "modules": {
        "generalPages": [
            {
                "key": "hello-world-page-jira",
                "location": "system.top.navigation.bar",
                "name": {
                    "value": "Hello World"
                },
                "url": "/hello-world",
                "conditions": [{
                    "condition": "user_is_logged_in"
                }]
            },
            {
                "key": "hello-world-page-confluence",
                "location": "system.header/left",
                "name": {
                    "value": "Hello World"
                },
                "url": "/hello-world",
                "conditions": [{
                    "condition": "user_is_logged_in"
                }]
            }
        ]
    }
}

和我的credatials.json

{
    "hosts": {
        "connect-ace.atlassian.net": {
            "product": "jira",
            "username": "michael@---",
            "password": "---password---"
        }
    }
}

如何让我的开发帐户使用 connect-ace?

您是否尝试过生成自己的云实例并在那里进行测试?如果还没有,请尝试创建一个 here。成功注册后,在您的 credentials.json 中,将 "connect-ace" 更改为您的 baseUrl/sitename 并使用正确的凭据,它应该会自动为您安装。

此错误是 atlas-connect 的默认错误 Print error image

在 atlassian-connect.json 替换为:

  "lifecycle": {
        "installed": "/installed"
    },

为此:

 "lifecycle": {
        "installed": "installed"
    },

要检查两件事:

1 - 检查 credentials.json 的值是否正确。主机 url 应以 https:// 开头。密码是从 here 生成的 api 令牌。

{
    "hosts": {
        "https://<your atlassian site name>.atlassian.net": {
            "product": "jira",
            "username": "<jira user name>",
            "password": "<Token created from https://id.atlassian.com/manage/api-tokens>"
        }
    }
}

2- Enable development mode 在设置 -> 应用 -> 管理应用 -> 设置。 (如果应用程序未在市场上发布,则这是必需的)