リモートリポジトリの url の変更

方法

昔のリポジトリで,git@〜 ではなくて https〜 になっていたのを直したかった.

$ git remote -v
origin  https://github.com/username/repositoryname (fetch)
origin  https://github.com/username/repositoryname (push)

これは git remote set-url で変更できる.
git@〜 にするには,https:// を git@に,username/ を username: にする.

git remote set-url origin git@github.com:username/repositoryname

Front page   Edit Diff Attach Copy Rename Reload   New List of pages Search Recent changes   Help   RSS of recent changes
Last-modified: 2024-12-16 (Mon) 03:49:03 (38d)