From c412208e80c2e5cad0694227b8f8d40541bb71ed Mon Sep 17 00:00:00 2001 From: Qizhen WENG Date: Mon, 27 Feb 2023 15:54:56 +0800 Subject: [PATCH] [BUG] credentials.ini under $HOME instead of root MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to [Credentials 设置](https://help.aliyun.com/document_detail/378659.html), the credentials.ini should be placed at `~/.alibabacloud/credentials.ini` instead of `/.alibabacloud/credentials.ini`. --- alibabacloud_credentials/providers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alibabacloud_credentials/providers.py b/alibabacloud_credentials/providers.py index 33b6521..1332aba 100644 --- a/alibabacloud_credentials/providers.py +++ b/alibabacloud_credentials/providers.py @@ -489,7 +489,7 @@ def parse_ini(self): if file_path is None: if not ac.HOME: return - file_path = os.path.join(ac.HOME, "/.alibabacloud/credentials.ini") + file_path = os.path.join(ac.HOME, ".alibabacloud/credentials.ini") if len(file_path) == 0: raise CredentialException("The specified credentials file is empty")