git
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
#contents
*不具合 [#sba65155]
**remote: HTTP Basic: Access denied. [#l987e4b4]
remote: HTTP Basic: Access denied. If a password was pro...
fatal: Authentication failed for 'https://hoge.com/hoge/...
gitを使うパソコンごとにトークンを作って、そのトークンをGi...
2026/4にこのエラーが出るようになったが、それまではパスワ...
**パソコンごとにトークンを作って、GitLabに登録。 [#t1796e...
ssh-keygen -t ed25519 をやると
~/.ssh/id_ed25519(秘密鍵)
~/.ssh/id_ed25519.pub(公開鍵)ができる。
cat ~/.ssh/id_ed25519.pub で公開鍵を表示して、コピペして...
-GitLabに公開鍵を登録
GitLabにログイン→右上アイコン → Preferences → 左側のメニ...
-接続テスト
ssh -T git@gitlab.com
Are you sure you want to continue connecting (yes/no)? →...
成功した場合:Welcome to GitLab, @ユーザー名!
-リモートURLをSSHに変更
-gitのディレクトリ(~/git/hoge)に入ってから
git remote set-url origin git@gitlab.com:hogehoge/hogeho...
git remote -v
これで、pullやpushをやって、パスワードを聞かれなければ成...
**ssh -T git@gitlab.comをやったら無反応 [#d6f5c16f]
上記の
ssh -T git@gitlab.com
をやった後、無反応で止まってしまった場合、
ssh -vT git@gitlab.com
をやって、ログを見る(生成AIに原因を教えてもらう)。
その結果、SSHは完全に成功していて、鍵認証も通っていて、En...
以下をやってみる。
-リモートURLをSSHに変えてるか確認:
git remote -v
-HTTPSなら:
git remote set-url origin git@gitlab.com:hoge/hoge.git
-動作確認
git pull
これで無反応で止まっている場合、
GIT_SSH_COMMAND="ssh -v" git pull
でログを見る(生成AIに見せて原因を判断してもらう)。
Connecting to gitlab.com [2606:4700:...]
となっていたら、IPv6で接続している。
-IPv4強制
~/.ssh/config に追加:
Host gitlab.com
Hostname gitlab.com
User git
IdentityFile ~/.ssh/id_ed25519
AddressFamily inet
ちなみに、最後の行のinetがIPv4のこと、inet6ならIPv6
**他のパソコンでgitで編集したのを忘れてpullする前に編集し...
他のパソコンでgitで編集したのを忘れてpullする前に一旦 編...
pullで戻そうとしても、
* branch master -> FETCH_HEAD
hint: You have divergent branches and need to specify ho...
hint: You can do so by running one of the following comm...
hint: your next pull:
hint:
hint: git config pull.rebase false # merge
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --gl...
hint: preference for all repositories. You can also pass...
hint: or --ff-only on the command line to override the c...
hint: invocation.
fatal: Need to specify how to reconcile divergent branch...
みたいなエラーが出て戻せなくなる。その場合は、pullする前...
git stash
git pull --rebase
終了行:
#contents
*不具合 [#sba65155]
**remote: HTTP Basic: Access denied. [#l987e4b4]
remote: HTTP Basic: Access denied. If a password was pro...
fatal: Authentication failed for 'https://hoge.com/hoge/...
gitを使うパソコンごとにトークンを作って、そのトークンをGi...
2026/4にこのエラーが出るようになったが、それまではパスワ...
**パソコンごとにトークンを作って、GitLabに登録。 [#t1796e...
ssh-keygen -t ed25519 をやると
~/.ssh/id_ed25519(秘密鍵)
~/.ssh/id_ed25519.pub(公開鍵)ができる。
cat ~/.ssh/id_ed25519.pub で公開鍵を表示して、コピペして...
-GitLabに公開鍵を登録
GitLabにログイン→右上アイコン → Preferences → 左側のメニ...
-接続テスト
ssh -T git@gitlab.com
Are you sure you want to continue connecting (yes/no)? →...
成功した場合:Welcome to GitLab, @ユーザー名!
-リモートURLをSSHに変更
-gitのディレクトリ(~/git/hoge)に入ってから
git remote set-url origin git@gitlab.com:hogehoge/hogeho...
git remote -v
これで、pullやpushをやって、パスワードを聞かれなければ成...
**ssh -T git@gitlab.comをやったら無反応 [#d6f5c16f]
上記の
ssh -T git@gitlab.com
をやった後、無反応で止まってしまった場合、
ssh -vT git@gitlab.com
をやって、ログを見る(生成AIに原因を教えてもらう)。
その結果、SSHは完全に成功していて、鍵認証も通っていて、En...
以下をやってみる。
-リモートURLをSSHに変えてるか確認:
git remote -v
-HTTPSなら:
git remote set-url origin git@gitlab.com:hoge/hoge.git
-動作確認
git pull
これで無反応で止まっている場合、
GIT_SSH_COMMAND="ssh -v" git pull
でログを見る(生成AIに見せて原因を判断してもらう)。
Connecting to gitlab.com [2606:4700:...]
となっていたら、IPv6で接続している。
-IPv4強制
~/.ssh/config に追加:
Host gitlab.com
Hostname gitlab.com
User git
IdentityFile ~/.ssh/id_ed25519
AddressFamily inet
ちなみに、最後の行のinetがIPv4のこと、inet6ならIPv6
**他のパソコンでgitで編集したのを忘れてpullする前に編集し...
他のパソコンでgitで編集したのを忘れてpullする前に一旦 編...
pullで戻そうとしても、
* branch master -> FETCH_HEAD
hint: You have divergent branches and need to specify ho...
hint: You can do so by running one of the following comm...
hint: your next pull:
hint:
hint: git config pull.rebase false # merge
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --gl...
hint: preference for all repositories. You can also pass...
hint: or --ff-only on the command line to override the c...
hint: invocation.
fatal: Need to specify how to reconcile divergent branch...
みたいなエラーが出て戻せなくなる。その場合は、pullする前...
git stash
git pull --rebase
ページ名: