我正在使用python jira客户端使用基本身份验证建立与jira的连接。
from jira.client import JIRA
jira = JIRA(options={'server': 'https://server.atlassian.net'},
basic_auth=('email@example.com', 'pass'))
Run Code Online (Sandbox Code Playgroud)
这段代码直到昨天都工作良好。
从GET https://server.atlassian.net/rest/api/2/serverInfo获得可恢复的错误,将在17.5832343958s中重试1/3。错误:401
我的密码和电子邮件是正确的。我可以手动登录
我的任务是读取应用程序运行时的 JSON 文件并将其存储在配置中。我已经浏览过https://hexdocs.pm/elixir/master/Config.Provider.html
现在我的配置提供程序代码是
defmodule JSONConfigProvider do
@behaviour Config.Provider
# Let's pass the path to the JSON file as config
def init(path) when is_binary(path), do: path
def load(config, path) do
# We need to start any app we may depend on.
{:ok, _} = Application.ensure_all_started(:jason)
json = path |> File.read!() |> Jason.decode!()
json
end
end
Run Code Online (Sandbox Code Playgroud)
当我尝试通过 iex 运行它时,一切看起来都很好
JSONConfigProvider.load([existing: :config, app: [:appname]],"file_path")
Run Code Online (Sandbox Code Playgroud)
下一步是然后在指定您的发布时,您可以在发布配置中指定提供者
我没有混合版本。有什么方法可以将其存储在配置(dev.ex)中吗?