search

Home  >  Q&A  >  body text

git中,克隆好的本地库,能从ssh切换到https吗

用ssh的地址初始化了本地库,能动态切换成https吗?还是要重新clone本地库

巴扎黑巴扎黑2770 days ago737

reply all(3)I'll reply

  • 迷茫

    迷茫2017-04-24 09:15:02

    git remote remove xxxxx
    git remote add xxxxx url

    或者

    git remote set-url xxxx url

    reply
    0
  • PHP中文网

    PHP中文网2017-04-24 09:15:02

    No problem, just operate git remote again
    For example

    git remote add <name> https://....
    

    or

    git remote set-url <name> https://...
    

    reply
    0
  • ringa_lee

    ringa_lee2017-04-24 09:15:02

    Just enter the url item in .git/conf in your project directory and it will be ok

    reply
    0
  • Cancelreply