賞金將在 2 天內到期。此問題的答案有資格獲得 50聲望賞金。 Flora Biletsiou正在尋找一個規范的答案。
在重新安裝aws-cli. 我嘗試了所有我能找到的建議解決方案,但似乎沒有任何效果。
我正在使用 Ubuntu 21.10 并安裝:
$ aws --v
aws-cli/1.19.1 Python/3.9.7 Linux/5.13.0-41-generic botocore/1.20.0
git version 2.32.0
我得到的錯誤是:
fatal: unable to access 'https://git-codecommit.eu-west-2.amazonaws.com/v1/repos/myrepo/': The requested URL returned error: 403
它曾經詢問我的用戶名和密碼,但在我嘗試解決問題后,它完全停止詢問我的憑據。無論哪種方式,我都確認我使用了正確的憑據。此外,我在 AWS 確實擁有必要的權限。直到幾個小時前,我才成功地拉動和推送更新。
aws 憑證助手按照大多數在線解決方案的建議進行設定。更具體地說,我的.gitconfig檔案如下所示:
[user]
name = My_name
email = My_email
[credential]
helper = !aws codecommit credential-helper $@
UseHttpPath = true
此外,我正確(使用正確的區域)設定了$ aws configure配置。
$ git config --list --show-origin我得到的清單:
file:/etc/gitconfig user.email=My_email
file:/home/f_user/.gitconfig user.name=My_name
file:/home/f_user/.gitconfig user.email=My_email
file:/home/f_user/.gitconfig credential.helper=!aws codecommit credential-helper $@
file:/home/f_user/.gitconfig credential.usehttppath=true
老實說,我不知道還能嘗試什么,任何幫助將不勝感激!
編輯: 我解決問題的方法是:
- 從我的系統中卸載 aws 客戶端并從頭開始重新安裝和配置它。
- 我克隆了我的 IAM 賬戶并為其授予了完整的 AWSCodeCommit 訪問權限。
我不確定解決它的部分是什么,可能是第一步。
uj5u.com熱心網友回復:
仔細檢查 CodeCommit 的AWS 托管策略。
如果您的IAM User 已切換到ForceMultiFactorAuthenticationas policy,您將需要使用令牌,而不是您的密碼。
在本地,檢查您的憑證管理器存盤的密碼:
printf "protocol=https\nhost=git-codecommit.eu-west-2.amazonaws.com"|aws codecommit credential-helper get
uj5u.com熱心網友回復:
畢竟我解決問題的方法是:
Uninstalled aws client from my system and re installed and configured it from scratch.
I cloned my IAM account and gave it Full AWSCodeCommit access.
我不確定解決它的部分是什么,這可能是我重新安裝所有內容后的第一步,再次提示我使用我的憑據。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/478890.html
標籤:混帐 亚马逊网络服务 ubuntu aws-cli aws-codecommit
下一篇:使用嵌套函式更改進行模擬測驗
