windows下使用Git Bash命令行git克隆远程仓库代码
此处使用的代码托管平台是GitLab,相比GitHub来说,它可以设置免费的私有仓库,哈哈,妈妈再也不用担心我的源码泄露了! 1、切换到本地的工作目录,我的目录是: cd /d/coder/website/doctor 2、使用ssh 命令生成密钥 ssh-keygen.exe -t rsa -C "yourmail@mail.com" (-t参数后面跟的是要生成密钥的名称,-C后面跟的是你GitLab中注册时使用的邮箱) 3、接下来提示你输入存储密钥的目录,回车使用默认的目录就行;接下来让你设置连接密码,为了方便我 回车 设为空密码,比较方便,有需要设密码的也可以键入自己的密码 Generating public/private rsa key pair. Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /c/Users/Administrator/.ssh/id_rsa. Your public key has been saved in /c/Users