前端之家收集整理的这篇文章主要介绍了
解决git&github 相关问题,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
<table class="text"><tbody><tr class="li1">
<td class="ln"><pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
代码,
修改之后,提交报错:
☁ aliyundm [master] git push -u origin master
remote: Permission to quefei/aliyundm.git denied to wulingmei.
fatal: unable to access 'https://github.com/quefei/aliyundm.git/': The requested URL returned error:
403
解决办法:
因为我git clone 的时候是以https的方式clone的,所以提交的时候是ssh提交的,所以只要把remote 的url的https方式改成ssh方式就ok了
Changing a remote's URL
参考:
1、https://help.github.com/articles/changing-a-remote-s-url/
2、https://www.zhihu.com/question/26954892
问题二:
修改了~/.ssh
文件夹下所有
文件权限为777,导致报:
☁ aliyundm [master] git push -u origin master
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for '/Users/zhangwei/.ssh/id_rsa' are too open.
It is
required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/Users/zhangwei/.ssh/id_rsa": bad permissions
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists
解决方法:
不要设置成777,设置成600就OK。
chmod 600 ~/.ssh/*
参考:
1、https://serverfault.com/questions/253313/ssh-returns-bad-owner-or-permissions-on-ssh-config 原文链接:/github/418235.html