• windows powershell 支持git ssh 配置


    1. ssh-agent从 Windows 服务启动:
    • 键入ServicesStart MenuWin+R,然后键入services.msc启动服务窗口;
    • OpenSSH Authentication Agent在列表中找到并双击它;
    • OpenSSH Authentication Agent Properties窗口出现,选择AutomaticStartup type:下拉菜单,然后单击StartService status:。确保它现在说Service status: Running
    1. 配置Git的发出在PowerShell中的以下命令来使用Windows 10执行的OpenSSH:git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe;

    2. 通过编辑在 中config找到的文件C:\Users\%YOUR_USERNAME%\.ssh\config,将SSH 配置为在启动时自动将密钥添加到代理,并添加以下行:

    Host *
        AddKeysToAgent yes
        IdentitiesOnly yes
    

    如果您使用自定义名称或多个 SSH 密钥生成了 SSH 密钥,您还可以添加以下行:

    Host github.com
        HostName github.com
        User your_user_name
        IdentityFile ~/.ssh/your_file_name
    
    1. ssh-agent通过发出ssh-add命令并输入您的密码将您的 SSH 密钥添加到:
    ssh-add $HOME/.ssh/your_file_name
    
    1. 完毕!如有必要,现在重新启动 Powershell 甚至 Windows。
  • 相关阅读:
    css中的选择器
    HTML5总结
    table中的一些另类标签
    form表单
    Laravel常用命令行中文版
    浅谈Session与Cookie的区别与联系
    Wechat微信公众平台开发
    js中的正则表达式入门
    畅谈Redis和Memcached的区别
    php的ob缓存详解
  • 原文地址:https://www.cnblogs.com/onephp/p/16266067.html
Copyright © 2020-2023  润新知