在 windows 上折腾 GitHub

mac2022-06-30  31

GitHub for Windows

这是最好的方法,强烈推荐。下载GitHub for Windows。

GitHub 正在开发新的桌面客户端,可以留意 这里。

在安装完 GitHub for Windows 之后,完全可以使用客户端操作,不需要输多余的命令。但是当我们需要配合其他软件使用的时候,还是得配置 git shell。

 

通过 Git 链接 GitHub

官方教程在 这里。

到 这里 下载 Git。安装完后打开 Git Bash。

依次输入以下命令:

ls -al ~/.sshssh-keygen -t rsa -b 4096 -C "your_email@example.com"ssh-agent -seval $(ssh-agent -s)

ssh-add ~/.ssh/id_rsa

拷贝密钥

clip < ~/.ssh/id_rsa.pub

然后到网页上登陆你的 GitHub,添加 SSH Key。

接下来测试上面的操作有没有成功:输入命令:ssh -T git@github.com会提示你:

123 The authenticity of host 'github.com (207.97.227.239)' can't be established.# RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.# Are you sure you want to continue connecting (yes/no)?

输入 yes 继续,如果连接成功的话会收到类似下面的消息:

12 Hi username! You've successfully authenticated, but GitHub does not# provide shell access.

完成这些操作后,windows 版的 Hexo 就可以正常上传了。

转载于:https://www.cnblogs.com/JinyaoLi/p/4672379.html

最新回复(0)