V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
git
Pro Git
Atlassian Git Tutorial
Pro Git 简体中文翻译
GitX
JarvisTang
V2EX  ›  git

请教一个 SourceTree Mac 版的 SSH Key 配置问题

  •  
  •   JarvisTang · 2017-07-16 00:46:39 +08:00 · 6991 次点击
    这是一个创建于 2468 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我不是技术员,也不会命令行,所以使用了 GUI 工具。

    我在 Windows 中使用 SourceTree,工具里有创建 SSH Key,随着程序也有启动 Pageant Key 工具,在这里增加和加载 Key

    但是在 Mac 版上面,我不会配置了,请教大家,在 Mac 里,怎么配置 SourceTree 呢?

    SourceTree -> 偏好设置 -> 账户
    这里可以登录 GitHub 和 Bitbucket,第一次登录后,我可以拉取和推着,但是重启后就不行了。

    另外,GitHub 和 Bitbucket 之外的 Git 怎么配置 Key 呢?

    先谢谢大家了,教一下小白吧。
    4 条回复    2017-07-17 13:43:48 +08:00
    mxi1
        1
    mxi1  
       2017-07-16 00:50:06 +08:00
    命令行里面,运行 ssh-keygen,会自动生成一组 key。输出信息里面有存放的位置
    dongoo
        2
    dongoo  
       2017-07-16 14:03:57 +08:00
    通过命令,生成一对密钥:

    ssh-keygen -t rsa -C "备注"
    cxbig
        3
    cxbig  
       2017-07-16 20:35:45 +08:00
    用 ssh-keygen 生成一组 key,默认名字是 id_rsa 和 id_rsa.pub ,默认放~/.ssh/目录下
    如果你想独立 key 的用途,可以给不同的名字
    然后用 cat ~/.ssh/id_rsa.pub | pbcopy 命令吧 pub 拷贝到剪贴板
    去对应的网站把这个 key 保存进去即可

    GitHub 和 BitBucket 有教程怎么操作:
    https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/
    https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html
    JarvisTang
        4
    JarvisTang  
    OP
       2017-07-17 13:43:48 +08:00
    感谢楼上三位

    我已经弄好了。

    晚上再测试一下,重启电脑会不会自动加载。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5410 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 08:15 · PVG 16:15 · LAX 01:15 · JFK 04:15
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.