使用 Rally 脚本时用 API 密钥替换凭据
replace credentials with API Key when using Rally scripts
因此,我正在使用以下 Ruby 脚本对用户权限进行批量更改:https://github.com/RallyTools/Rally-User-Management
我的问题是我需要将此代码放在其他人可能能够访问它的服务器上,我想更改 my_vars.rb 文件以 API 密钥而不是我的用户名和密码。
这可能吗?因为它看起来不像删除用户名和密码行那样简单,然后用 API key
中的一行替换这些行
rally_api gem 的 documentation shows example of creating a connection with ApiKey in the Usage 部分。用户 management 实用程序基于此 gem.
#Using api keys? -- currently rally1 only
Go to https://rally1.rallydev.com/login
You can generate an api key on this site and use it *instead* of username and password
config = {:base_url => "https://rally1.rallydev.com/slm"}
config[:api_key] = "_your_api_key_from_https://rally1.rallydev.com/login"
config[:workspace] = "Workspace Name"
config[:project] = "Project Name"
config[:headers] = headers #from RallyAPI::CustomHttpHeader.new()
提交历史显示rally_api从1.0版本开始支持ApiKey认证
因此,我正在使用以下 Ruby 脚本对用户权限进行批量更改:https://github.com/RallyTools/Rally-User-Management
我的问题是我需要将此代码放在其他人可能能够访问它的服务器上,我想更改 my_vars.rb 文件以 API 密钥而不是我的用户名和密码。
这可能吗?因为它看起来不像删除用户名和密码行那样简单,然后用 API key
中的一行替换这些行rally_api gem 的 documentation shows example of creating a connection with ApiKey in the Usage 部分。用户 management 实用程序基于此 gem.
#Using api keys? -- currently rally1 only
Go to https://rally1.rallydev.com/login
You can generate an api key on this site and use it *instead* of username and password
config = {:base_url => "https://rally1.rallydev.com/slm"}
config[:api_key] = "_your_api_key_from_https://rally1.rallydev.com/login"
config[:workspace] = "Workspace Name"
config[:project] = "Project Name"
config[:headers] = headers #from RallyAPI::CustomHttpHeader.new()
提交历史显示rally_api从1.0版本开始支持ApiKey认证