منو سایت

  • خانه
  • وبلاگ
  • duplicity oauthlib.oauth2.rfc6749.errors.InvalidGrantError – وبلاگ

duplicity oauthlib.oauth2.rfc6749.errors.InvalidGrantError – وبلاگ

 تاریخ انتشار :
/
  وبلاگ

اگر خطای تکراری زیر را دارید، احتمالاً توکن شما منقضی شده است و باید یک رمز جدید ایجاد کنید.

oauthlib.oauth2.rfc6749.errors.InvalidGrantError: (invalid_grant) The user could not be authenticated as the grant is expired. The user must sign in again.

برای ایجاد یک مورد جدید، فقط duplicity را اجرا کنید و مراحل را دنبال کنید، چیزی شبیه به:

+ duplicity remove-older-than 1M onedrive://Duplicity_backups/usr_local_etc

Could not load OAuth2 token. Trying to create a new one. (original error: [Errno 2] No such file or directory: '/root/.duplicity_onedrive_oauthtoken.json')

In order to authorize duplicity to access your OneDrive, please open https://login.live.com/oauth20_authorize.srf?response_type=code&client_id=YOURID&redirect_uri=https%3A%2F%2Flogin.live.com%2Foauth20_desktop.srf&scope=Files.Read+Files.ReadWrite+User.Read+offline_access&state=YOURSECRETKEY&display=touch in a browser and copy the URL of the blank page the dialog leads to.

URL of the blank page: https://login.live.com/oauth20_desktop.srf?code=YOURCODE5&state=YOURSERET=NUMBERS

در صورت نیاز به کمک، نظر خود را بنویسید.

یک راه خوب برای پیکربندی تکراری با OneDrive را می‌توانید در اینجا پیدا کنید: https://blog.xmatthias.com/duplicity-onedrive/، اگر از FreeBSD استفاده می‌کنید، می‌توانید همان را اعمال کنید.

2022.02.12 – به روز رسانی: همانطور که جان در نظر اشاره کرد، تغییر نام یا حذف .duplicity_onedrive_oauthtoken.json می تواند یک نسخه تکراری برای راه اندازی یک پیکربندی جدید OneDrive ایجاد کند.