0
1

SourceTreeからgit clone ができない時

Last updated at Posted at 2024-07-27

SourceTreeからgit clone ができない時

確認

スクリーンショット 2024-07-27 191311.png

ソースパス/ソース URL として正しくありません。

スクリーンショット 2024-07-27 191331.png

コマンド: git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks ls-remote https://github.com/....git
出力:
エラー: remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/....git

エラーの意味:
パスワード認証のサポートは、2021年8月13日に削除されました。

方法

  1. githubサイトにいく。

  2. [自分のアイコン] -> [Settings]をクリック
    スクリーンショット 2024-07-27 191537.png

  3. Developer settings クリック
    スクリーンショット 2024-07-27 191624.png

  4. Tokens (classic) クリック
    スクリーンショット 2024-07-27 191637.png

  5. [Generate new token] -> [Generate new token (classic)] クリック
    スクリーンショット 2024-07-27 191717.png

  6. Note, Expiration を入力
    スクリーンショット 2024-07-27 191735.png

  7. チェックボックスは、ご自分の環境に合わせて設定する。
    例:
    repo
    workflow
    admin:repo_hook
    user
    delete_repo

  8. Generate token クリック
    スクリーンショット 2024-07-27 191747.png

  9. 生成されたtokenをコピー
    スクリーンショット 2024-07-27 191833.png

  10. Sourcetreeに戻り、gitアドレス前に {token}@ を記載する。
    スクリーンショット 2024-07-27 191858.png

例:
https://{ token }@github.com/xxxx/xxxx.git

OK

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1