clone と認証
clone する
サイトのhttps://git.kumidana.com/<サイトのスラッグ>.git です。/v1/<サイトのスラッグ>)に
git clone https://git.kumidana.com/docs.git管理画面の/admin/repository)にも、
認証を
新しくmain にcms.json({ "format": 1 })だけがgit init でmain とcms.json は、site:update-settings の
個人アクセストークンで認証する
個人アクセストークンは、kmd_pat_ でpcms_pat_ で
- 管理画面の
「アカウント」から 「個人アクセストークン」 ( /admin/account/tokens)を開きます。 - 名前を
付け、 範囲と 期限を 選んで 作成します。 作成には パスキーでの 再確認が 要ります。 - 画面に
出た トークンを コピーします。 トークンの 全文が 見えるのは、 作成した 直後の 1 回だけです。 - clone や
push で 聞かれたら、 パスワードの 欄に その トークンを 貼ります。
範囲は
| 範囲 | できる |
|---|---|
| 読み取り | clone と |
| 読み書き | 読み取りに |
選べるmain に
期限は
MCP 用の
認証が通らないとき
| 表示 | 原因 |
|---|---|
| 認証が |
トークンが |
| Not Found | URL の |
| 権限が |
トークンの |
| 権限が |
トークンの |
OAuth でブラウザから許可する
トークンをgit が
Git から
brew install git-credential-oauth
git config --global --add credential.helper cache
git config --global --add credential.helper oauth
git config --global credential.https://git.kumidana.com.oauthClientId git
git config --global credential.https://git.kumidana.com.oauthAuthURL https://admin.kumidana.com/oauth/authorize
git config --global credential.https://git.kumidana.com.oauthTokenURL https://admin.kumidana.com/oauth/token
git config --global credential.https://git.kumidana.com.oauthDeviceAuthURL https://admin.kumidana.com/oauth/device/code
git config --global credential.https://git.kumidana.com.oauthScopes write設定したgit clone すると、
- 読み取りだけに
する ときは、 oauthScopesをreadにします。 - ブラウザを
開けない 環境 (SSH で 入った サーバーなど)では、 デバイスフローを 使います。 git credential-oauth -deviceを実行すると URL と コードが 出るので、 別の 端末で URL を 開き、 コードを 入れて 許可します。 - アクセストークンは
1 時間、 リフレッシュトークン ( kmd_ort_。以前は pcms_ort_)は30 日です。 使う たびに リフレッシュトークンは 新しくなります。 - 許可した
アプリは、 「アカウント」の 「許可した アプリ」で 一覧でき、 取り消せます。 - 使えなくなった
ときは、 git credential-oauth eraseで保存済みの 資格情報を 消して、 もう 一度 clone や push を します。
この
資格情報を保存する
トークンを
git config --global credential.helper osxkeychainWindows はmanager(Git Credential Manager)、libsecret やcache がhttps://<トークン>@git.kumidana.com/... のgit remote -v や
トークンの
SSH では接続できない
Kumidana のgit@git.kumidana.com:... のような
管理画面の