{"id":897,"date":"2021-08-15T14:02:41","date_gmt":"2021-08-15T14:02:41","guid":{"rendered":"https:\/\/www.step3.net\/?p=897"},"modified":"2026-07-25T07:21:18","modified_gmt":"2026-07-25T07:21:18","slug":"github-personal-access-token%e3%81%a8%e3%80%81macos%e3%81%ab%e3%80%81%e3%82%82%e3%81%a6%e3%81%82%e3%81%9d%e3%81%b0%e3%82%8c%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.step3.net\/?p=897","title":{"rendered":"GitHub Personal Access Token\u3068\u3001MacOS\u306b\u3001\u3082\u3066\u3042\u305d\u3070\u308c\u308b&#8230;"},"content":{"rendered":"<p>2021\/8\/12\u306bGitHub\u304b\u3089\u30e1\u30fc\u30eb\u304c\u304d\u305f\u3002<\/p>\n<table style=\"border-collapse: collapse; width: 100%; height: 20px;\" border=\"1\">\n<tbody>\n<tr style=\"height: 20px;\">\n<td style=\"width: 100%; height: 20px;\"><\/p>\n<p>[GitHub] Deprecation Notice<\/p>\n<p>\u00a0<\/p>\n<p>Hi @xxxxx,<\/p>\n<p>You recently used a password to access the repository at weekbosons\/COVID19 with git using git\/2.24.3 (Apple Git-128).<br \/>Basic authentication using a password to Git is deprecated and will soon no longer work. Visit https:\/\/github.blog\/2020-12-15-token-authentication-requirements-for-git-operations\/ for more information around suggested workarounds and removal dates.<\/p>\n<p>\u00a0<\/p>\n<p>Thanks,<br \/>The GitHub Team<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>2021\/8\/13\u4ee5\u964d\u3001Github\u306bcli\u30a2\u30af\u30bb\u30b9\u3059\u308b\u6642\u306f\u3001password\u3092\u4f7f\u3063\u305fBASIC\u8a8d\u8a3c\u306f\u52d5\u304b\u306a\u304f\u306a\u308b\u3002\u4eca\u5f8c\u306fPAT(Personal Access Token)\u3092\u4f7f\u3048\u3068\u306e\u3053\u3068\u3002id?,password?\u3064\u304b\u3063\u305f\u899a\u3048\u304c\u306a\u3044\u3002\u3002\u3002\u3002<br \/>\u6848\u5185\u3069\u304a\u308a\u3059\u3059\u3081\u3001Github\u306e\u30da\u30fc\u30b8\u3067\u3001PAT\u306f\u4f5c\u6210\u3067\u304d\u305f\u3002<\/p>\n<p>\u00a0<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 100%;\"><\/p>\n<p>[GitHub] A personal access token has been added to your accoun<\/p>\n<p><\/p>\n<p>Hey @xxxx,<\/p>\n<p>A personal access token (NewPersonalAccessToken) with repo scope was recently added to your account. Visit https:\/\/github.com\/settings\/tokens for more information.<br \/>To see this and other security events for your account, visit https:\/\/github.com\/settings\/security-log<br \/>If you run into problems, please contact support by visiting https:\/\/github.com\/contact<\/p>\n<p>\u00a0<\/p>\n<p>Thanks,<br \/>The GitHub Team<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u00a0<\/p>\n<p>\u305d\u3057\u3066\u30018\/13\u304c\u6765\u305f\u3002\u30ed\u30fc\u30ab\u30ebrepo\u306e\u66f4\u65b0\u3092\u3001github\u4e0a\u306e\u30ea\u30e2\u30fc\u30c8repo\u306b\u53cd\u6620\u3057\u3088\u3046\u3068\u3057\u3066\u3001git push\u3057\u305f\u3089\u3001\u30a8\u30e9\u30fc\u306b\u306a\u3063\u305f\u3002<br \/>$ git push<br \/>remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.<br \/>remote: Please see https:\/\/github.blog\/2020-12-15-token-authentication-requirements-for-git-operations\/ for more information.<br \/>fatal: unable to access &#8216;https:\/\/github.com\/xxxxxxxx.git\/&#8217;: The requested URL returned error: 403<\/p>\n<p>\u00a0<\/p>\n<p>\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u306fPAT\u3092\u4f7f\u3046\u3088\u3046\u306b\u66f8\u3044\u3066\u3042\u308b\u3002\u3057\u304b\u3057\u3001github\u4e0a\u3067\u4f5c\u6210\u3057\u305fPAT\u3092\u3001\u3069\u3053\u3067\u3001\u3069\u306e\u3088\u3046\u306b\u3001\u8a2d\u5b9a\u3059\u308b\u306e\u304b\uff1f\u305d\u306e\u65b9\u6cd5\u306f\u3001\u8ab0\u3082\u304a\u3057\u3048\u3066\u304f\u308c\u306a\u3044\u3002<\/p>\n<p>\u00a0<\/p>\n<p>Google\u691c\u7d22\u3057\u3001MacOS\u4e0a\u3067\u306e\u8a2d\u5b9a\u65b9\u6cd5\u3092\u635c\u3057\u305f\u3002<br \/>\u25a0<a href=\"https:\/\/docs.github.com\/ja\/github\/getting-started-with-github\/getting-started-with-git\/updating-credentials-from-the-macos-keychain\" target=\"_blank\" rel=\"noopener\">macOS \u30ad\u30fc\u30c1\u30a7\u30fc\u30f3\u304b\u3089\u306e\u8a8d\u8a3c\u60c5\u5831\u3092\u66f4\u65b0\u3059\u308b<\/a><\/p>\n<p>\u25a0<a href=\"https:\/\/zenn.dev\/suzuki_hoge\/articles\/2021-08-github-access-f732e5b9868137\" target=\"_blank\" rel=\"noopener\">Mac \u304c\u899a\u3048\u3066\u3044\u308b GitHub \u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30d1\u30fc\u30bd\u30ca\u30eb\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u306b\u5909\u66f4\u3059\u308b<\/a><\/p>\n<p><a href=\"https:\/\/www.step3.net\/wp-content\/uploads\/2026\/07\/202108151.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 3px;\" title=\"202108151\" src=\"https:\/\/www.step3.net\/wp-content\/uploads\/2026\/07\/202108151.jpg\" alt=\"202108151\" width=\"300\" height=\"195\" border=\"0\" \/><\/a><\/p>\n<p>\u00a0<\/p>\n<p>MacOS\u306e\u30ad\u30fc\u30c1\u30a7\u30fc\u30f3\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306bPAT\u3092\u8a2d\u5b9a\u3059\u308c\u3070\u3044\u3044\u3068\u66f8\u3044\u3066\u3042\u3063\u305f\u3002\u8a2d\u5b9a\u3059\u308b\u3068\u3001\u8a2d\u5b9a\u30c0\u30a4\u30a2\u30ed\u30b0\u30dc\u30c3\u30af\u30b9\u304c\u958b\u304f\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8981\u6c42\u3057\u3066\u304f\u308b\u3002\u3069\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\uff1fPAT\u304b\u3068\u601d\u3063\u3066\u5165\u529b\u3059\u308b\u3068\u3001\u5931\u6557\u3002MacOS\u3078\u306e\u30ed\u30b0\u30a4\u30f3\u30d1\u30b9\u30ef\u30fc\u30c9\u3060\u3063\u305f\u3002<\/p>\n<p>\u00a0<\/p>\n<p>\u3060\u308c\u3082\u6559\u3048\u3066\u304f\u308c\u306a\u3044\u3002<\/p>\n<p>\u00a0<\/p>\n<p>\u305f\u3057\u304b\u306b\u3001git push\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002<\/p>\n<p>$ git push origin work<br \/>Total 0 (delta 0), reused 0 (delta 0)<br \/>To https:\/\/github.com\/xxxxxx.git<br \/>7c3895d..1d4da32 work -&gt; work<\/p>\n<p>\u3057\u304b\u3057\u3001\u306a\u305c\u3001\u30ad\u30fc\u30c1\u30a7\u30fc\u30f3\u306a\u306e\u304b\uff1f\u308f\u304b\u3089\u306a\u3044\u3002\u3060\u308c\u3082\u6559\u3048\u3066\u304f\u308c\u306a\u3044\u3002<\/p>\n<p>\u00a0<\/p>\n<p>Git\u304c\u53e4\u3044\u3060\u3051\uff1f\u30bd\u30fc\u30b9\u304b\u3089build\u3057\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3059\u308c\u3070\u89e3\u6c7a\u3059\u308b\u3053\u3068\u306b\u671f\u5f85\u3057\u3001Git\u306e\u30b5\u30a4\u30c8\u304b\u3089\u30bd\u30fc\u30b9\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3044\u305f\u3002<br \/>May the Source be with you!Git\u306e\u4e2d\u3001\u3069\u3053\u3067\u3001MacOS\u306e\u30ad\u30fc\u30c1\u30a7\u30fc\u30f3\u3092\u51e6\u7406\u3057\u3066\u3044\u308b\u306e\u304b\uff1fGit\u306e\u30bd\u30fc\u30b9\u3092\u8aad\u3093\u3081\u3070\u308f\u304b\u308b\u304b\uff1f\u3002<\/p>\n<p>cat git-\/contrib\/credential\/osxkeychain\/git-credential-osxkeychain.c<\/p>\n<p>static void add_internet_password(void)<br \/>{<br \/>\/* Only store complete credentials *\/<br \/>if (!protocol || !host || !username || !password)<br \/>return;<\/p>\n<p>if (SecKeychainAddInternetPassword(<br \/>KEYCHAIN_ARGS,<br \/>KEYCHAIN_ITEM(password),<br \/>NULL))<br \/>return;<br \/>}<\/p>\n<p>\u00a0<\/p>\n<p>\u78ba\u304b\u306b\u3001PAT\u3092\u8a2d\u5b9a\u3057\u305f\u3001MacOS\u30ad\u30fc\u30c1\u30a7\u30fc\u30f3\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30af\u30ec\u30c7\u30f3\u30b7\u30e3\u30eb\u3068\u3057\u3066\u8aad\u307f\u3053\u3093\u3067\u3044\u305f\u3002Git\u81ea\u8eab\u304cMacOS\u306e\u30ad\u30fc\u30c1\u30a7\u30fc\u30f3\u3092\u30af\u30ec\u30c7\u30f3\u30b7\u30e3\u30eb\u3068\u3057\u3066\u4f7f\u3063\u3066\u3044\u308b\u3002\u3067\u3082\u3001\u306a\u305c\u3001Git\u304c\u3001\u30af\u30ec\u30c7\u30f3\u30b7\u30e3\u30eb\u306bMacOS\u306e\u30ad\u30fc\u30c1\u30a7\u30fc\u30f3\u3092\u4f7f\u3063\u3066\u3044\u308b\u306e\u304b\uff1f<\/p>\n<p>\u308f\u304b\u3089\u306a\u3044\u3002\u3060\u308c\u3082\u6559\u3048\u3066\u304f\u308c\u306a\u3044\u3002<\/p>\n<p>\u00a0<\/p>\n<p>Git\u304c\u81ea\u8eab\u306e\u69cb\u6210\u60c5\u5831\u3067\u3001MacOS\u306e\u30ad\u30fc\u30c1\u30a7\u30fc\u30f3\u3092\u4f7f\u3046\u6307\u5b9a\u3092\u3057\u3066\u3044\u308b\u306e\u304b\uff1fgit\u306e\u69cb\u6210\u60c5\u5831\u3092\u53c2\u7167\u3057\u305f\u3002<\/p>\n<p>\u00a0git config -l credential.helper=osxkeychain<\/p>\n<p>\u78ba\u304b\u306bgit\u306fMacoS\u30ad\u30fc\u30c1\u30a7\u30fc\u30f3\u3092\u30af\u30ec\u30c7\u30f3\u30b7\u30e3\u30eb\u306e\u30d8\u30eb\u30d1\u30fc\u3068\u3057\u3066\u8a8d\u8b58\u3057\u3066\u3044\u308b\u3002\u3067\u3082\u3001\u79c1\u306f\u305d\u3093\u306a\u8a2d\u5b9a\u3092\u3057\u305f\u899a\u3048\u304c\u306a\u3044\u3002\u30ec\u30dd\u30b8\u30c8\u30ea\u306e\u3042\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3042\u308bgit config\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u3093\u3067\u307f\u305f\u3002\u305d\u3053\u306b\u306f\u3001\u306a\u306b\u3082\u8a18\u8ff0\u304c\u306a\u3044\u3002\u5f53\u305f\u308a\u524d\u3001\u79c1\u304c\u305d\u3093\u306a\u8a2d\u5b9a\u3092\u3057\u305f\u899a\u3048\u304c\u306a\u3044\u306e\u3060\u304b\u3089\u3002\u3082\u3057\u3084\uff1f\u3068\u304a\u3082\u3044\u3001\u30ed\u30b0\u30a4\u30f3\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3042\u308bgit\u306econfig\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u3093\u3067\u307f\u305f\u304c\u3001\u305d\u3053\u306b\u3082\u3001\u306a\u306b\u3082\u8a18\u8ff0\u304c\u306a\u3044\u3002<\/p>\n<p>git config &#8211;local -l<\/p>\n<p>git config &#8211;global -l<\/p>\n<p>MacoS\u30ad\u30fc\u30c1\u30a7\u30fc\u30f3\u3092\u30af\u30ec\u30c7\u30f3\u30b7\u30e3\u30eb\u306e\u30d8\u30eb\u30d1\u30fc\u3068\u3057\u3066\u3044\u308b\u7b87\u6240\u306f\u306a\u3044\u3002<\/p>\n<p>\u00a0<\/p>\n<p>\u305f\u3057\u304b\u3001\u3053\u306egit\u306f\u3001Xcode\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3068\u304d\u3001Xcode\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3082\u306e<\/p>\n<p>whereis git<br \/>\/usr\/bin<\/p>\n<p>\/usr\/bin\u306b\u3042\u308b\u3088\u3046\u3060\u3002<\/p>\n<p>\u00a0<\/p>\n<p>\/usr\/bin\/git &#8211;version<br \/>ME866JA:Kawasaki momma$ git &#8211;version<br \/>git version 2.24.3 (Apple Git-128)<\/p>\n<p>\u3068\u6253\u3064\u3068\u3001Apple-128\u3068\u3042\u308b\u3002Apple\u8b39\u88fdgit\u306f\u306a\u306b\u304b\u3061\u304c\u3046\u306e\u304b\uff1f<\/p>\n<p>\u00a0<\/p>\n<p>\u6551\u3044\u306e\u624b\u306f\u3001Google\u304b\u3089\u304d\u305f\u3002<\/p>\n<p><a href=\"https:\/\/zenn.dev\/suzuki_hoge\/articles\/2021-08-github-access-f732e5b9868137\" target=\"_blank\" rel=\"noopener\">disable git credential-osxkeychain<\/a> \u3069\u3046\u3082\u3001Xcode\u306b\u3001\u8a2d\u5b9a\u304c\u3042\u308b\u3088\u3046\u3060\u3002\u78ba\u304b\u306b\u8a18\u8f09\u304c\u3042\u3063\u305f\u3002<\/p>\n<p>\u00a0<\/p>\n<p>git config &#8211;get-all &#8211;show-origin credential.helper<br \/>file:\/Applications\/Xcode.app\/Contents\/Developer\/usr\/share\/git-core\/gitconfig osxkeychain<\/p>\n<p>\u00a0<\/p>\n<p>\u7d50\u5c40\u3001Apple\u8b39\u88fdgit\u306f\u3001MacOS\u30ad\u30fc\u30c1\u30a7\u30fc\u30f3\u4f7f\u7528\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u3060\u3063\u305f\u4e8b\u304c\u3001\u5224\u660e\u3057\u305f\u3002\u30cd\u30c3\u30c8\u306b\u306f\u3001\u3069\u3046\u3059\u308c\u3070\u3044\u3044\uff1f\u3053\u3046\u3059\u308c\u3070\u3044\u3044\u3002\u3068\u3001\u8868\u9762\u4e0a\u306e\u60c5\u5831\u3060\u3051\u304c\u3001\u6563\u3089\u3070\u3063\u3066\u3044\u308b\u3060\u3051\u3002\u3042\u308b\u610f\u5473\u3001\u30ce\u30a4\u30ba\u3002\u305d\u306e\u672c\u8cea\u3092\u8ffd\u7a76\u3057\u3001\u30cd\u30c3\u30c8\u4e0a\u3067\u5171\u6709\u3057\u30b7\u30b0\u30ca\u30eb\u3092\u767a\u4fe1\u3057\u3066\u304f\u308c\u308b\u4eba\u306f\u3001\u672c\u5f53\u306b\u5c11\u306a\u304f\u306a\u3063\u305f\u3002<\/p>\n<p>\u00a0<\/p>\n<p>\u30cd\u30c3\u30c8\u306eS\/N\u6bd4\u3001\u304b\u306a\u308a\u60aa\u304f\u306a\u3063\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2021\/8\/12\u306bGitHub\u304b\u3089\u30e1\u30fc\u30eb\u304c\u304d\u305f\u3002 [GitHub] Deprecation Notice \u00a0 Hi @xxxxx, You recently used a password to access the  [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-897","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.step3.net\/index.php?rest_route=\/wp\/v2\/posts\/897","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.step3.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.step3.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.step3.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.step3.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=897"}],"version-history":[{"count":1,"href":"https:\/\/www.step3.net\/index.php?rest_route=\/wp\/v2\/posts\/897\/revisions"}],"predecessor-version":[{"id":1635,"href":"https:\/\/www.step3.net\/index.php?rest_route=\/wp\/v2\/posts\/897\/revisions\/1635"}],"wp:attachment":[{"href":"https:\/\/www.step3.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.step3.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.step3.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}