Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qshell account 无法添加账户 #300

Open
rainerosion opened this issue Feb 9, 2021 · 3 comments
Open

qshell account 无法添加账户 #300

rainerosion opened this issue Feb 9, 2021 · 3 comments
Labels
bug Something isn't working. documentation Improvements or additions to documentation.

Comments

@rainerosion
Copy link

rainerosion commented Feb 9, 2021

问题描述

qshell account [--overwrite | -w]<Your AccessKey> <Your SecretKey> <Your Account Name>

当<Your AccessKey>第一位是-符时,无法添加帐号信息,因为我的AK是-ouz-ZyTuXORG0LM-xxxx,即使我使用双引号,如"-ouz-ZyTuXORG0LM-xxxx",依旧报错。目前我只能创建一个新的密钥(第一位非-)使用。旧密钥无法使用qshell。

同时我下载的qshell的地址是http://devtools.qiniu.com/qshell-linux-x64-v2.4.2.zip,版本应当是2.4.2,但是我使用./qshell --version显示的版本是qshell version v2.4.1 .

重现步骤

#添加双引号
./qshell account -w -ouz-ZyTuXORG0LM-xxxxxxx qUzEensC4xxxxxxxxxxx rains
#不添加双引号
./qshell account -w "-ouz-ZyTuXORG0LM-xxxxxxx" "qUzEensC4xxxxxxxxxxx" rains

期望结果?

  • 能够正常添加account
  • 同时能够正常使用

实际结果?

  • 无法添加帐号

错误日志/截图/配置参数

$ ./qshell account -w "-ouz-ZyTuXORG0LM-xxxxxxx" "qUzEensC4xxxxxxxxxxx" rains
Error: unknown shorthand flag: 'o' in -ouz-ZyTuXORG0LM-xxxxxxx
Usage:
  qshell account [<AccessKey> <SecretKey> <Name>] [flags]

Flags:
  -h, --help        help for account
  -w, --overwrite   overwrite account or not when account exists in local db, by default not overwrite

Global Flags:
  -C, --config string   config file (default is $HOME/.qshell.json)
  -D, --ddebug          debug mode
  -d, --debug           debug mode
  -L, --local           use current directory as config file path
  -v, --version         show version

unknown shorthand flag: 'o' in -ouz-ZyTuXORG0LM-xxxxxxx

$ ./qshell account -w -ouz-ZyTuXORG0LM-xxxxxxx qUzEensC4xxxxxxxxxxx rains   
Error: unknown shorthand flag: 'o' in -ouz-ZyTuXORG0LM-xxxxxxx
Usage:
  qshell account [<AccessKey> <SecretKey> <Name>] [flags]

Flags:
  -h, --help        help for account
  -w, --overwrite   overwrite account or not when account exists in local db, by default not overwrite

Global Flags:
  -C, --config string   config file (default is $HOME/.qshell.json)
  -D, --ddebug          debug mode
  -d, --debug           debug mode
  -L, --local           use current directory as config file path
  -v, --version         show version

unknown shorthand flag: 'o' in -ouz-ZyTuXORG0LM-xxxxxxx

相关环境信息

@rainerosion rainerosion changed the title qshell account 存在问题 qshell account 无法添加 Feb 9, 2021
@rainerosion rainerosion changed the title qshell account 无法添加 qshell account 无法添加账户 Feb 9, 2021
@Mei-Zhao
Copy link
Contributor

Mei-Zhao commented Feb 9, 2021

您好,感谢您的反馈,因首字符为‘-’导致无法添加账号的问题在老版本中确实存在,我们会在新版本中进一步改进,当前请您这样使用:
https://developer.qiniu.com/kodo/1302/qshell

如果ak, sk, name首字母是"-", 需要使用如下的方式添加账号, 这样避免把该项识别成命令行选项: $ qshell account -- ak sk name

新版本会在本次春节过后发布

@Mei-Zhao Mei-Zhao added bug Something isn't working. documentation Improvements or additions to documentation. labels Feb 9, 2021
@rainerosion
Copy link
Author

您好,感谢您的反馈,因首字符为‘-’导致无法添加账号的问题在老版本中确实存在,我们会在新版本中进一步改进,当前请您这样使用:
https://developer.qiniu.com/kodo/1302/qshell

如果ak, sk, name首字母是"-", 需要使用如下的方式添加账号, 这样避免把该项识别成命令行选项: $ qshell account -- ak sk name

新版本会在本次春节过后发布

感谢!!同时建议将qshell account -- ak sk name使用方法加入文档https://github.com/qiniu/qshell/blob/master/docs/account.md中,https://developer.qiniu.com/kodo/1302/qshell这篇文档中提到的使用方法的确实没注意到。

@Mei-Zhao
Copy link
Contributor

Mei-Zhao commented Feb 9, 2021

我们的使用文档已更新 https://github.com/qiniu/qshell/blob/master/docs/account.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. documentation Improvements or additions to documentation.
Projects
None yet
Development

No branches or pull requests

2 participants