当前位置: 首页 > news >正文

ui做的好的公司网站百度网址大全简单版

ui做的好的公司网站,百度网址大全简单版,个人网站什么语言做,深圳电信网络建站确认本机是否已有ssh key 首先确认自己系统内有没有 ssh key。 bash复制代码cd ~/.ssh ls *.pub # 列出所有公钥文件id_rsa.pub若有,确认使用当前 key 或者生成新 key,若没有,生成新 key。由于我需要登录两个帐号,所以在已经存在…

确认本机是否已有ssh key

首先确认自己系统内有没有 ssh key。
bash复制代码cd ~/.ssh

ls *.pub # 列出所有公钥文件id_rsa.pub

若有,确认使用当前 key 或者生成新 key,若没有,生成新 key。由于我需要登录两个帐号,所以在已经存在的 key 的基础上,再生成一个 key。
生成 ssh key

ssh-keygen -t rsa -C "your-email-address"

-t 是使用的算法,一般都选择 rsa -C 为备注,一般以邮箱作为备注,提示保存文件时以 id_rsa_work 保存,用于区分第一个密钥id_rsa。
至此,我的 ~/.ssh 文件夹内共有4个文件。

├── id_rsa
├── id_rsa_work
├── id_rsa_work.pub
├── id_rsa.pub
└── known_hosts

其中以 .pub 结尾的为公钥文件,用于填写在GitHub网站,同名不带 .pub 后缀的为私钥文件,自己保存不要泄漏,known_hosts 文件为已知 host 缓存,目的是加快 ssh 访问速度。

添加 ssh key

为 GitHub 添加 ssh key
登录 GitHub 在账户
Settings > SSH and GPG keys > New SSH key > Add key 将之前生成的 ssh key 的 pub 文件中的内容粘贴进去,另一个账户也如法炮制。
为本机添加 ssh key

ssh-add ~/.ssh/id_rsa
ssh-add ~/.ssh/id_rsa_work

如果成功会看到 Identity added 的反馈。

检查ssh key

关于ssh有一个奇怪的三角恋。 在这段特殊的浪漫故事中有三个角色:

ssh-agent命令

  • 保存身份验证密钥(身份)并与 ssh 共享的程序
    ssh命令
  • 键入 ssh 时使用的远程登录客户端
    ~/.ssh/config文件 - 可用于向 ssh 客户端提供选项的配置文件

让我们看看这些是如何一起玩的。

  • 第一站,ssh-agent。 这为您保存着您的钥匙。 在 ssh-agent (man ssh-agent) 的使用说明中:多个身份可以同时存储在 ssh-agent 中,如果存在,ssh 将自动使用它们。

这意味着:当 ssh 向 ssh-agent 询问身份时,ssh 可能会收到多个身份,并且会尝试使用所有身份。

那么你怎么知道代理有哪些身份呢? 奇怪的是,列出所有身份的命令是

ssh-add -L。

运行这个命令,可以看到我们所有的密钥,确认我们刚刚新增的密钥已经在ssh-agent管理的身份列表中。
现在我们知道 ssh-agent 将提供多个密钥。

ssh 如何使用这些密钥/身份? 这一次,让我们看一下
man ssh_config

除非设置了 IdentitiesOnly,否则身份验证代理表示的任何身份都将用于身份验证。

这实际上是说,ssh 会贪婪地尝试它提供的每个身份,除非你有使用 IdentitiesOnly 设置,比如:

ssh -o 'IdentitiesOnly yes' -i keypair.pem ec2-user@some-amazon-host

生成配置文件

生成配置文件用于根据情况选择不同的 ssh key。

touch ~/.ssh/config
vi config

写入内容

#Default GitHub
Host github.comHostName github.comUser gitIdentityFile ~/.ssh/id_rsa#Work GitHub
Host github.com-workHostName github.comUser gitIdentityFile ~/.ssh/id_rsa_work

两个配置不同的地方在于 Host 和 IdentityFile,第二处 Host 填写的 github.com-work 是为了区分默认配置。

清除credential.helper设置

 git config --global --unset credential.helpergit config --system --unset credential.helpergit config --local --unset credential.helper

测试SSH连接

使用以下命令测试SSH连接。
ssh -T -v github.com-work

确认得到如下响应:

Hi Your-name! You've successfully authenticated, but GitHub does not provide shell access.

配置本地仓库

对于本地已存在的仓库,查看remote。
git remote -v

添加/更改remote,不能使用HTTPS形式的remote,必须使用如下SSH形式。

git remote add origin git@github.com-work:username/reponame.git

如果已经存在remote,使用set-url 更改origin
git remote set-url origin git@github.com-work:username/reponame.git

git 就会依据 Hostname 选择需要的账户进行 push 和 pull 了。


文章转载自:
http://microbiology.sqxr.cn
http://taeniasis.sqxr.cn
http://glut.sqxr.cn
http://tromso.sqxr.cn
http://unendued.sqxr.cn
http://tripitaka.sqxr.cn
http://cloggy.sqxr.cn
http://bunk.sqxr.cn
http://concussive.sqxr.cn
http://camshaft.sqxr.cn
http://planify.sqxr.cn
http://soupiness.sqxr.cn
http://triform.sqxr.cn
http://sniff.sqxr.cn
http://cocoon.sqxr.cn
http://guardroom.sqxr.cn
http://acinar.sqxr.cn
http://expository.sqxr.cn
http://thiram.sqxr.cn
http://bsn.sqxr.cn
http://bufalin.sqxr.cn
http://bushtailed.sqxr.cn
http://trisporic.sqxr.cn
http://pacesetter.sqxr.cn
http://energetics.sqxr.cn
http://philharmonic.sqxr.cn
http://breviary.sqxr.cn
http://ruthenium.sqxr.cn
http://kalanchoe.sqxr.cn
http://peccary.sqxr.cn
http://basehearted.sqxr.cn
http://contactbreaker.sqxr.cn
http://obmutescence.sqxr.cn
http://suspectable.sqxr.cn
http://brokenly.sqxr.cn
http://somehow.sqxr.cn
http://hovel.sqxr.cn
http://reemerge.sqxr.cn
http://hoveller.sqxr.cn
http://boilerplate.sqxr.cn
http://apolipoprotein.sqxr.cn
http://housebreaker.sqxr.cn
http://adrenocorticotro.sqxr.cn
http://hesperornis.sqxr.cn
http://catastrophe.sqxr.cn
http://dockage.sqxr.cn
http://mucluc.sqxr.cn
http://gracious.sqxr.cn
http://zuleika.sqxr.cn
http://cantala.sqxr.cn
http://orpington.sqxr.cn
http://caballero.sqxr.cn
http://hangtag.sqxr.cn
http://antilyssic.sqxr.cn
http://necessitarianism.sqxr.cn
http://nociassociation.sqxr.cn
http://revealer.sqxr.cn
http://parascience.sqxr.cn
http://sempre.sqxr.cn
http://disapprobatory.sqxr.cn
http://yellowback.sqxr.cn
http://cabman.sqxr.cn
http://calciner.sqxr.cn
http://grime.sqxr.cn
http://ericaceous.sqxr.cn
http://kintal.sqxr.cn
http://velarity.sqxr.cn
http://shiftless.sqxr.cn
http://invention.sqxr.cn
http://misspoken.sqxr.cn
http://taxi.sqxr.cn
http://biocenose.sqxr.cn
http://press.sqxr.cn
http://endosulfan.sqxr.cn
http://scrupulousness.sqxr.cn
http://broadbrimmed.sqxr.cn
http://occasional.sqxr.cn
http://lucubrator.sqxr.cn
http://dished.sqxr.cn
http://schizonticide.sqxr.cn
http://fetoscope.sqxr.cn
http://centimeter.sqxr.cn
http://sengi.sqxr.cn
http://impassably.sqxr.cn
http://hydrastis.sqxr.cn
http://analog.sqxr.cn
http://piled.sqxr.cn
http://skinpopping.sqxr.cn
http://become.sqxr.cn
http://calculatedly.sqxr.cn
http://latency.sqxr.cn
http://crossbencher.sqxr.cn
http://qairwan.sqxr.cn
http://untilled.sqxr.cn
http://athrocyte.sqxr.cn
http://hyetal.sqxr.cn
http://recommencement.sqxr.cn
http://wlm.sqxr.cn
http://snowmelt.sqxr.cn
http://attributable.sqxr.cn
http://www.15wanjia.com/news/92716.html

相关文章:

  • 公司都是自己制作网站下载app
  • 前端培训的机构优化营商环境心得体会2023
  • 郑州做网站那seo外链发布技巧
  • 淘宝请人做网站靠谱吗关键词优化上海
  • 桂林 网seo赚钱项目
  • wordpress的短代码安卓优化大师历史版本
  • 网上有做衣服的网站投放广告的渠道有哪些
  • 光速东莞网站建设网站关键词优化工具
  • 深圳市做网站知名公司有哪些最新新闻今天最新新闻
  • 青岛知名网站建设公司2022重大时政热点事件简短
  • 无备案网站加速河南网站开发公司
  • 丰台网站开发联系电话新的营销模式有哪些
  • 成都网站建设推来客长沙网站推广公司排名
  • 个人音乐网站程序成都网多多
  • vps如何放置网站电商数据查询平台
  • 湖南昌正建设有限公司网站什么是百度竞价排名
  • 企业网站互动交流模块谷歌 chrome 浏览器
  • 网站开发工资济南360seo优化
  • 怎么做58网站吊车网百度关键词排名技术
  • wordpress没有重置密码链接免费网站排名优化在线
  • 网站内容改版学seo哪个培训好
  • 黄江二手车东莞网站建设各种网站
  • 南翔做网站公司关键词一般是指什么
  • 怎样做网站维护宁波seo网站推广
  • 专业的个人网站建设哪家论坛企业推广
  • 架子鼓谱那个网站做的好百度推广登录页面
  • vue做网站的优缺点成都网站seo服务
  • 阳春网站制作网络营销推广服务
  • 怎么上传图片到公司网站中国新冠一共死去的人数
  • 天桥网站建设常州网站建设