digoal
2021-08-14
PostgreSQL , key , github
通过 ssh key 认证的方法.
ssh-keygen -t rsa
设置 key 的密码
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
chmod 700 ~/.ssh
chmod 400 ~/.ssh/id_rsa
chmod 400 ~/.ssh/id_rsa.pub
cat ~/.ssh/id_rsa.pub
修改github个人设置, 安全设置, 新增ssh key, 把~/.ssh/id_rsa.pub内容贴近去.
如果你的git原来是用户密码认证的, 修改一下url.
cd repo
vi .git/config
[remote "origin"]
url = git的ssh地址(可以在github repo中code下拉框的clone, ssh内容得到, 例如 git@github.com:digoal/abcd.git)
如果你是重新使用git@github.com:digoal/abcd.git
这种地址clone的项目, 则不需要修改config.
git clone --depth 1 git@github.com:digoal/abcd.git
会自动要求使用key认证.
您的愿望将传达给PG kernel hacker、数据库厂商等, 帮助提高数据库产品质量和功能, 说不定下一个PG版本就有您提出的功能点. 针对非常好的提议,奖励限量版PG文化衫、纪念品、贴纸、PG热门书籍等,奖品丰富,快来许愿。开不开森.