赞
踩
1.https方式(以失败告终)
1.输入语句
git clone 链接
出现如下界面,需要账号密码,密码我不知道是什么,随便输入后出现如下错误(大体意思就是身份校验失败)
- Cloning into 'vue_1'...
- remote: HTTP Basic: Access denied
- fatal: Authentication failed for 'https://gitcode.net/weinipeizhen/vue/vue_1.git/'
2.找到控制面板,------>用户账户------>凭据管理器------->管理windows凭据,找到刚才账号密码,进行删除;
删除之后,继续执行clone语句,重新输入账号密码(由于我不知道账号密码,试了多次未成功)
1. ssh方法(成功了)
输入语句
git clone git@地址
2.会出现错误(大体意思就是没有生成公钥,权限被拒绝)
- Cloning into 'vue_1'...
- The authenticity of host 'gitcode.net (119.3.229.170)' can't be established.
- RSA key fingerprint is SHA256:pyrMa3p0o90Qsuz2+kMX3CIBl+S1cZsdRlCoaosSgQs.
- Are you sure you want to continue connecting (yes/no)? yes
- Warning: Permanently added 'gitcode.net,119.3.229.170' (RSA) to the list of known hosts.
- git@gitcode.net: Permission denied (publickey).
- fatal: Could not read from remote repository.
- Please make sure you have the correct access rights
- and the repository exists.
3.生成公钥
- ssh-keygen -t ed25519 -C "xxx@xxx.com"
- 之后按三次回车即可
-
注意:“xxx@xxx.com”并不是邮箱名称,而是生成 sshkey的名称
cat ~/.ssh/id_ed25519.pub ------生成公钥
cat ~/.ssh/id_ed25519 ---------生成密钥
4.配置公钥
注意:有效期的设置时间
5.输入
证明成功!!!
6.输入,回车即可
git clone git@项目链接地址
到这里项目便可以clone完毕了!!!
7.我第一次设置的有效时间不足24小时(看不懂英文意思),clone之后会有提示
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。