发布的时候要求输入密匙,忘记密匙了,有没有办法可以重置或取消。
Enter passphrase for key '/c/Users/Jing/.ssh/id_rsa':
还有个问题就是hexo如何删除已发布的文章?
(新人不大懂,麻烦各位讲的详细些。谢谢!)
问题已解决,其实问的时候已经知道解决方法了,心情有些太浮躁。两位回答都正确,只是只能采用一个答案。
世界只因有你2017-05-02 09:20:17
Delete inside the warehouse source/_posts/我的文章.md
Execute the following command to update the blog
hexo g
== hexo generate
#生成hexo s
== hexo server
#启动服务预览hexo d
== hexo deploy
#deployment
ssh-keygen -t rsa -C "邮箱地址" -f ~/.ssh/github_jslite
will generate
github_jslite
和github_jslite.pub
these two files
vim ~/.ssh/github_jslite.pub
Open the public key file
github_jslite.pub
and copy the content to the code hosting platform
vim ~/.ssh/config
#修改config文件,如果没有创建 config
Host jslite.github.com
HostName github.com
User git
IdentityFile ~/.ssh/github_jslite
Host abc.github.com
HostName github.com
User git
IdentityFile ~/.ssh/github_abc
shell
git remote add origin git@jslite.github.com:JSLite/JSLite.git
ssh -T git@jslite.github.com
# @
followed by the defined Host
ringa_lee2017-05-02 09:20:17
Just follow the steps to generate the key again.
Just delete the corresponding md files in ./source/_posts/, but you cannot delete them all, and an error will be reported.
ps: hexo version: 3.0.0
習慣沉默2017-05-02 09:20:17
Configuring and using Github
The following tutorial is mainly written with reference to beiyuu's "Using Github Pages to Build an Independent Blog".
Configure SSH keys
How do we connect the local git project with the remote github? Use SSH keys.
Check the settings of SSH keys
First we need to check the existing ssh key on your computer:
$ cd ~/.ssh Check the local ssh key
If it prompts: No such file or directory, it means you are using git for the first time.
Generate new SSH Key:
$ ssh-keygen -t rsa -C "email address@youremail.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):<Just press Enter>
Note 1: For the email address here, you can enter your own email address; Note 2: The "-C" here is a capital "C"
Then the system will ask you to enter your password:
Enter passphrase (empty for no passphrase):<Enter the encrypted string>
Enter same passphrase again:<Enter the encrypted string again>
When you press Enter, you will be prompted to enter a password. This password will be used when you submit the project. If it is empty, you do not need to enter it when submitting the project. This setting is to prevent others from submitting content to your project.
Note: There is no * when entering the password, you can just enter it directly.
Finally when I saw this interface, I successfully set the ssh key:
Add SSH Key to GitHub
After setting the SSH Key on this machine, it needs to be added to GitHub to complete the setting of the SSH link.
1. Open the local C:Documents and SettingsAdministrator.sshid_rsa.pub file. The content in this file is the key generated just now. If you can't see this file, you need to set it to show hidden files. Accurately copy the contents of this file to ensure successful setup.
2. Log in to the github system. Click Account Settings--->SSH Public keys in the upper right corner ---> add another public keys
3. Copy your locally generated key into it (key text box), click add key and it’s OK
Test
You can enter the following command to see if the setting is successful. Do not modify the git@github.com part:
$ ssh -T git@github.com
If it is the following feedback:
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)?
Don’t be nervous, just enter yes and you will see:
Hi cnfeat! You've successfully authenticated, but GitHub does not provide shell access.
Set user information
Now that you can connect to GitHub via SSH, there are still some personal information that need to be completed.
Git will record submissions based on the user's name and email address. GitHub also uses this information to process permissions. Enter the following code to set personal information, and replace the name and email with your own. The name must be your real name, not your GitHub nickname.
$ git config --global user.name "cnfeat"//Username
$ git config --global user.email "cnfeat@gmail.com"//Fill in your own email
SSH Key configured successfully
This machine has successfully connected to github.
If there is any problem, please reset it. Please refer to common mistakes:
GitHub Help - Generating SSH Keys
GitHub Help - Error Permission denied (publickey)
http://www.jianshu.com/p/05289a4bc8b2