Skip to content

jdc configure不支持自定义profile name #8

@bingli7

Description

@bingli7
# jdc configure add --profile libingtest --access-key myak --secret-key mysk --region-id cn-north-1 --endpoint www.jdcloud-api.com --scheme https --timeout 20
Configure successfully!
# cat ~/.jdc/config 
[libingtest]
access_key = myak
secret_key = mysk
region_id = cn-north-1
endpoint = www.jdcloud-api.com
scheme = https
timeout = 20

current里为default:

# cat ~/.jdc/current 
default
# jdc nc describe-containers 
Please use `jdc configure add` command to add cli configure first.

手动更改为自定义profile name:

# vi ~/.jdc/current
:s/default/libingtest/g

仍然失败:

# jdc nc describe-containers 
Please use `jdc configure add` command to add cli configure first.

不自定义profile:

# jdc configure add --access-key myak --secret-key mysk --region-id cn-north-1 --endpoint www.jdcloud-api.com --scheme https --timeout 20
Configure successfully!

成功:

# jdc nc describe-containers
{
    "error": null, 
    "result": {
        "totalCount": 0, 
        "containers": null
    }, 
    "request_id": "bcv8c6whjcj2t6rmpf6fd9qqmqd50nvf"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions