V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
git
Pro Git
Atlassian Git Tutorial
Pro Git 简体中文翻译
GitX
JarvisTang
V2EX  ›  git

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

  •  
  •   JarvisTang · Jul 16, 2017 · 7853 views
    This topic created in 3208 days ago, the information mentioned may be changed or developed.
    我不是技术员,也不会命令行,所以使用了 GUI 工具。

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

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

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

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

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

    ssh-keygen -t rsa -C "备注"
    cxbig
        3
    cxbig  
       Jul 16, 2017
    用 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
       Jul 17, 2017
    感谢楼上三位

    我已经弄好了。

    晚上再测试一下,重启电脑会不会自动加载。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1155 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 23:13 · PVG 07:13 · LAX 16:13 · JFK 19:13
    ♥ Do have faith in what you're doing.