Mc: 'mc config host add'μ—λŠ” 자격 증λͺ… 확인을 κ±΄λ„ˆ λ›°λŠ” μ˜΅μ…˜μ΄μžˆμ„ 수 μžˆμŠ΅λ‹ˆλ‹€.

에 λ§Œλ“  2018λ…„ 03μ›” 27일  Β·  6μ½”λ©˜νŠΈ  Β·  좜처: minio/mc

μ˜ˆμƒλ˜λŠ” 행동

mc config host add μ—λŠ” 자격 증λͺ… 확인을 κ±΄λ„ˆ λ›°λŠ” μ˜΅μ…˜μ΄μžˆμ„ 수 μžˆμŠ΅λ‹ˆλ‹€.

μ‹€μ œ 행동

mc config host add s3-somebucket https://s3.cn-north-1.amazonaws.com.cn XXXXX XXXXXXXXXX S3v4
mc: <ERROR> Unable to initialize new config from the provided credentials. The specified bucket does not exist.

행동을 μž¬ν˜„ν•˜λŠ” 단계

λ‚΄ s3 iam 정책은 λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Stmt1506154426000",
            "Effect": "Allow",
            "Action": [
                "s3:*"
            ],
            "Resource": [
                "arn:aws-cn:s3:::somebucket/*"
            ]
        },
        {
            "Sid": "Stmt1506154452000",
            "Effect": "Allow",
            "Action": [
                "s3:*"
            ],
            "Resource": [
                "arn:aws-cn:s3:::somebucket"
            ]
        }
    ]
}

이전 λ²„μ „μ˜ mcμ—μ„œλŠ” 자격 증λͺ…을 μΆ”κ°€ ν•  λ•Œ ν™•μΈν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.
그리고 s3 μ•‘μ„ΈμŠ€ 킀에 λŒ€ν•΄ 맀우 μ—„κ²©ν•œ κΆŒν•œμ„ λΆ€μ—¬ν•©λ‹ˆλ‹€. κ·Έλž˜μ„œ λ‹€μŒκ³Ό κ°™μ΄ν•©λ‹ˆλ‹€.

μ•‘μ„ΈμŠ€ ν‚€λŠ” 버킷 이름을 λ‚˜μ—΄ ν•  수 μ—†μŠ΅λ‹ˆλ‹€.

2018-03-27 at 11 48 am

mc 버전

  • 버전 : 2018-03-25T01 : 22 : 22Z
    릴리슀 νƒœκ·Έ : RELEASE.2018-03-25T01-22-22Z
    컀밋 ID : da5c19848d1e82a24eddb453b01e83d4a0660de4

μ‹œμŠ€ν…œ 정보

macOS, Ubuntu 16.04μ—μ„œ ν…ŒμŠ€νŠΈ 됨

not our bug

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

--api s3v4 직접 μ œκ³΅ν•˜μ—¬ μœ νš¨μ„± 검사 호좜 경둜λ₯Ό ν˜ΈμΆœν•΄μ„œλŠ” μ•ˆλ©λ‹ˆλ‹€.

λͺ¨λ“  6 λŒ“κΈ€

--api s3v4 직접 μ œκ³΅ν•˜μ—¬ μœ νš¨μ„± 검사 호좜 경둜λ₯Ό ν˜ΈμΆœν•΄μ„œλŠ” μ•ˆλ©λ‹ˆλ‹€.

@ tru2dagame λ‹΅λ³€

(https://docs.minio.io/docs/minio-client-complete-guide)κ°€ s3v4 λ₯Ό κΈ°λ³Έκ°’μœΌλ‘œ μ§€μ •ν•˜κΈ° λ•Œλ¬Έμ— λŒ€λ‹΅μ€ μ•½κ°„ ν˜Όλž€ μŠ€λŸ½μŠ΅λ‹ˆλ‹€. --api μ˜΅μ…˜μ„ μ‚¬μš©ν•˜λ©΄ λͺ…μ‹œ 적으둜 νš¨κ³Όκ°€μžˆμ—ˆμŠ΅λ‹ˆλ‹€ (macos mc 버전 2018-03-25T01). μ˜΅μ…˜μ΄ μ—†μœΌλ©΄ 여기에보고 된 것과 λ™μΌν•œ 였λ₯˜κ°€ ν‘œμ‹œλ©λ‹ˆλ‹€.

--api μ˜΅μ…˜μ΄ 제곡되면 @rbetts 자격 증λͺ… 확인을 κ±΄λ„ˆ λœλ‹ˆλ‹€. μ˜΅μ…˜μ„ μ§€μ •ν•˜μ§€ μ•ŠμœΌλ©΄ κ·€ν•˜μ˜ 경우 μ‹€νŒ¨ν•œ 확인을 μˆ˜ν–‰ν•©λ‹ˆλ‹€. λ¬Έμ„œμ— μ˜΅μ…˜ μΆ”κ°€λ₯Ό κ²€ν† ν•©λ‹ˆλ‹€.

--api s3v4 맀개 λ³€μˆ˜μ—†μ΄ μž‘λ™ν•˜λ €λ©΄ mc μ •ν™•νžˆ μ–΄λ–€ κΆŒν•œμ΄ ν•„μš”ν•©λ‹ˆκΉŒ? μ•„λž˜ s3 μ‚¬μš©μž κΆŒν•œμ„ λΆ€μ—¬ν–ˆμ§€λ§Œ μ—¬μ „νžˆ μž‘λ™ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "s3:ListBucket",
            "Resource": "arn:aws-cn:s3:::<my-bucket>"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:GetObject",
                "s3:DeleteObject"
            ],
            "Resource": "arn:aws-cn:s3:::<my-bucket>/*"
        },
        {
            "Sid": "VisualEditor2",
            "Effect": "Allow",
            "Action": "s3:GetBucketLocation",
            "Resource": "arn:aws-cn:s3:::<my-bucket>"
        },
        {
            "Sid": "VisualEditor3",
            "Effect": "Allow",
            "Action": "s3:ListAllMyBuckets",
            "Resource": "*"
        }
    ]
}

λ‚˜λŠ” 이와 같은 λͺ…령을 μ‚¬μš©ν–ˆκ³  μ•„λž˜ 였λ₯˜ λ©”μ‹œμ§€κ°€ λ‚˜νƒ€λ‚©λ‹ˆλ‹€.

$ docker run -it --entrypoint=/bin/sh minio/mc:RELEASE.2018-05-25T20-20-15Z
$ mc config host add s3 <endpoint> <key> <secret>; mc ls s3/<my-bucket>

mc: Configuration written to `/root/.mc/config.json`. Please update your access credentials.
mc: Successfully created `/root/.mc/share`.
mc: Initialized share uploads `/root/.mc/share/uploads.json` file.
mc: Initialized share downloads `/root/.mc/share/downloads.json` file.
mc: <ERROR> Unable to initialize new config from the provided credentials. The specified bucket does not exist.
mc: <ERROR> Unable to stat `<my-bucket>`. Requested file `<my-bucket>` not found

그리고 --api s3v4 맀개 λ³€μˆ˜λ₯Ό μΆ”κ°€ν•˜λ©΄ λͺ¨λ“  것이 잘 μž‘λ™ν•©λ‹ˆλ‹€.

--api s3v4λ₯Ό 직접 μ œκ³΅ν•˜λ©΄ κ°€λŠ₯ν•˜λ©° μœ νš¨μ„± 검사 호좜 경둜λ₯Ό ν˜ΈμΆœν•˜λ©΄ μ•ˆλ©λ‹ˆλ‹€.

이것은 λ‚˜λ₯Ό μœ„ν•΄ μΌν–ˆμŠ΅λ‹ˆλ‹€. κ·ΈλŸ¬λ‚˜ 재판이 μ—†κ±°λ‚˜μ΄ 문제λ₯Ό λ°©λ¬Έν•˜μ§€ μ•Šκ³ λŠ” μ΄ν•΄ν•˜κΈ°κ°€ 맀우 ν˜Όλž€μŠ€λŸ½κ³  λΆˆκ°€λŠ₯ν•©λ‹ˆλ‹€.

mc config host add 은 (λŠ”) --api 인수 κ·Όμ²˜μ— μ„€λͺ…μ΄μžˆμ„ 수 있으며, μ΄λŠ” ν™œμ„± ν”„λ‘œλΈŒλ₯Ό 방지 ν•  것이라고 λ§ν•©λ‹ˆλ‹€.

λ˜ν•œ μΆ”κ°€ --debug 좜λ ₯ * 아무것도 *, λͺ…령은 단지 1 λΆ„ 이상 빈 눈으둜 λ‚˜λ₯Ό 쳐닀 λ³Έλ‹€ .. : /

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰