AWS: Can't clone repo Codecommit, The requested URL returned error: 403
I have two account AWS: DEV and PRD. I need to setup CodeCommit on PRD account. I test on DEV first. It worked well. Both DEV and PRD are setup CodeCommit on EU(Ireland) region. Then I clone all policy from DEV to PRD account.
When I tried to clone repo CodeCommit on PRD account, I have a problem like that:
fatal: unable to access 'URL xxx': The requested URL returned error: 403.
As I researched, I checked git and curl version. Git version is git version 2.14.4, curl version is
curl 7.53.1 (x86_64-redhat-linux-gnu) libcurl/7.53.1 NSS/3.28.4 zlib/1.2.8 libidn2/0.16 libpsl/0.6.2 (+libicu/50.1.2) libssh2/1.4.2 nghttp2/1.21.1
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz HTTP2 UnixSockets HTTPS-proxy PSL
Policy AWSCodeCommitPowerUser was attached for IAM user. Of course, I edited exactly repo as I want to user can access. IAM user also enabled HTTP credentials to access Repo CodeCommit.
I also tried to add credentials:
[credential]
helper = !aws codecommit credential-helper $@
UseHttpPath = true
I don't know what am I miss ? On DEV account, I setup the same. It worked.
Why did error appear on PRD account ? Could anyone explain for me ?
Thank you!
Update
I got that error cause by on PRD account, I've to enable MFA for IAM user.
It was resolved!
Thank all!
git amazon-web-services http-status-code-403 aws-codecommit
add a comment |
I have two account AWS: DEV and PRD. I need to setup CodeCommit on PRD account. I test on DEV first. It worked well. Both DEV and PRD are setup CodeCommit on EU(Ireland) region. Then I clone all policy from DEV to PRD account.
When I tried to clone repo CodeCommit on PRD account, I have a problem like that:
fatal: unable to access 'URL xxx': The requested URL returned error: 403.
As I researched, I checked git and curl version. Git version is git version 2.14.4, curl version is
curl 7.53.1 (x86_64-redhat-linux-gnu) libcurl/7.53.1 NSS/3.28.4 zlib/1.2.8 libidn2/0.16 libpsl/0.6.2 (+libicu/50.1.2) libssh2/1.4.2 nghttp2/1.21.1
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz HTTP2 UnixSockets HTTPS-proxy PSL
Policy AWSCodeCommitPowerUser was attached for IAM user. Of course, I edited exactly repo as I want to user can access. IAM user also enabled HTTP credentials to access Repo CodeCommit.
I also tried to add credentials:
[credential]
helper = !aws codecommit credential-helper $@
UseHttpPath = true
I don't know what am I miss ? On DEV account, I setup the same. It worked.
Why did error appear on PRD account ? Could anyone explain for me ?
Thank you!
Update
I got that error cause by on PRD account, I've to enable MFA for IAM user.
It was resolved!
Thank all!
git amazon-web-services http-status-code-403 aws-codecommit
add a comment |
I have two account AWS: DEV and PRD. I need to setup CodeCommit on PRD account. I test on DEV first. It worked well. Both DEV and PRD are setup CodeCommit on EU(Ireland) region. Then I clone all policy from DEV to PRD account.
When I tried to clone repo CodeCommit on PRD account, I have a problem like that:
fatal: unable to access 'URL xxx': The requested URL returned error: 403.
As I researched, I checked git and curl version. Git version is git version 2.14.4, curl version is
curl 7.53.1 (x86_64-redhat-linux-gnu) libcurl/7.53.1 NSS/3.28.4 zlib/1.2.8 libidn2/0.16 libpsl/0.6.2 (+libicu/50.1.2) libssh2/1.4.2 nghttp2/1.21.1
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz HTTP2 UnixSockets HTTPS-proxy PSL
Policy AWSCodeCommitPowerUser was attached for IAM user. Of course, I edited exactly repo as I want to user can access. IAM user also enabled HTTP credentials to access Repo CodeCommit.
I also tried to add credentials:
[credential]
helper = !aws codecommit credential-helper $@
UseHttpPath = true
I don't know what am I miss ? On DEV account, I setup the same. It worked.
Why did error appear on PRD account ? Could anyone explain for me ?
Thank you!
Update
I got that error cause by on PRD account, I've to enable MFA for IAM user.
It was resolved!
Thank all!
git amazon-web-services http-status-code-403 aws-codecommit
I have two account AWS: DEV and PRD. I need to setup CodeCommit on PRD account. I test on DEV first. It worked well. Both DEV and PRD are setup CodeCommit on EU(Ireland) region. Then I clone all policy from DEV to PRD account.
When I tried to clone repo CodeCommit on PRD account, I have a problem like that:
fatal: unable to access 'URL xxx': The requested URL returned error: 403.
As I researched, I checked git and curl version. Git version is git version 2.14.4, curl version is
curl 7.53.1 (x86_64-redhat-linux-gnu) libcurl/7.53.1 NSS/3.28.4 zlib/1.2.8 libidn2/0.16 libpsl/0.6.2 (+libicu/50.1.2) libssh2/1.4.2 nghttp2/1.21.1
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz HTTP2 UnixSockets HTTPS-proxy PSL
Policy AWSCodeCommitPowerUser was attached for IAM user. Of course, I edited exactly repo as I want to user can access. IAM user also enabled HTTP credentials to access Repo CodeCommit.
I also tried to add credentials:
[credential]
helper = !aws codecommit credential-helper $@
UseHttpPath = true
I don't know what am I miss ? On DEV account, I setup the same. It worked.
Why did error appear on PRD account ? Could anyone explain for me ?
Thank you!
Update
I got that error cause by on PRD account, I've to enable MFA for IAM user.
It was resolved!
Thank all!
git amazon-web-services http-status-code-403 aws-codecommit
git amazon-web-services http-status-code-403 aws-codecommit
edited Aug 22 at 15:25
asked Aug 22 at 10:00
Hoai Thai
64
64
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Had the exact same thing, just found the answer in their documentation:
"If you are using macOS, use HTTPS to connect to an AWS CodeCommit repository. After you connect to an AWS CodeCommit repository with HTTPS for the first time, subsequent access will fail after about fifteen minutes. The default Git version on macOS uses the Keychain Access utility to store credentials. For security measures, the password generated for access to your AWS CodeCommit repository is temporary, so the credentials stored in the keychain will stop working after about 15 minutes."
https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-https-unixes.html#setting-up-https-unixes-credential-helper
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51964354%2faws-cant-clone-repo-codecommit-the-requested-url-returned-error-403%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Had the exact same thing, just found the answer in their documentation:
"If you are using macOS, use HTTPS to connect to an AWS CodeCommit repository. After you connect to an AWS CodeCommit repository with HTTPS for the first time, subsequent access will fail after about fifteen minutes. The default Git version on macOS uses the Keychain Access utility to store credentials. For security measures, the password generated for access to your AWS CodeCommit repository is temporary, so the credentials stored in the keychain will stop working after about 15 minutes."
https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-https-unixes.html#setting-up-https-unixes-credential-helper
add a comment |
Had the exact same thing, just found the answer in their documentation:
"If you are using macOS, use HTTPS to connect to an AWS CodeCommit repository. After you connect to an AWS CodeCommit repository with HTTPS for the first time, subsequent access will fail after about fifteen minutes. The default Git version on macOS uses the Keychain Access utility to store credentials. For security measures, the password generated for access to your AWS CodeCommit repository is temporary, so the credentials stored in the keychain will stop working after about 15 minutes."
https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-https-unixes.html#setting-up-https-unixes-credential-helper
add a comment |
Had the exact same thing, just found the answer in their documentation:
"If you are using macOS, use HTTPS to connect to an AWS CodeCommit repository. After you connect to an AWS CodeCommit repository with HTTPS for the first time, subsequent access will fail after about fifteen minutes. The default Git version on macOS uses the Keychain Access utility to store credentials. For security measures, the password generated for access to your AWS CodeCommit repository is temporary, so the credentials stored in the keychain will stop working after about 15 minutes."
https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-https-unixes.html#setting-up-https-unixes-credential-helper
Had the exact same thing, just found the answer in their documentation:
"If you are using macOS, use HTTPS to connect to an AWS CodeCommit repository. After you connect to an AWS CodeCommit repository with HTTPS for the first time, subsequent access will fail after about fifteen minutes. The default Git version on macOS uses the Keychain Access utility to store credentials. For security measures, the password generated for access to your AWS CodeCommit repository is temporary, so the credentials stored in the keychain will stop working after about 15 minutes."
https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-https-unixes.html#setting-up-https-unixes-credential-helper
answered Nov 22 at 15:20
user2415430
312
312
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51964354%2faws-cant-clone-repo-codecommit-the-requested-url-returned-error-403%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown