index.html 64.5 KB
Newer Older
T
TRHX 已提交
1
               <!--@@@@@@@@@@@@@@^ .@@@@@@@@@@@\`    .@@@@@.   =@@@@^ .@@@@@@.   .@@@@@^      =@@@@@^         ./@@@@@@@@\.                      =@@@@@@@@@@@].     =@@@@O             ./@@@@@@@O`        .]@@@@@@@@].
T
TRHX 已提交
2 3 4 5 6 7 8 9
               .@@@@@@@@@@@@@@@@^ .@@@@@@@@@@@@@@`  .@@@@@.   =@@@@^  .@@@@@@. .@@@@@^       =@@@@@.       ./@@@@@@@@@@@@`                     =@@@@@@@@@@@@@^    =@@@@O            /@@@@@@@@@@@@.    ./@@@@@@@@@@@/
               .[[[[[\@@@@@[[[[[` .@@@@@...,\@@@@@. .@@@@@.   =@@@@^   .\@@@@\./@@@@^        ,@@@@@.       =@@@@@`..[\@/.                      =@@@@/...\@@@@@    =@@@@O           =@@@@@/.,@@@@@@.  .@@@@@@/..,\/.
                     =@@@@O       .@@@@@.   .@@@@@. .@@@@@`.../@@@@^     \@@@@@@@@@`         .@@@@/        =@@@@@@].                           =@@@@^  ./@@@@^    =@@@@O          .@@@@@^   .@@@@@^  /@@@@@.
                     =@@@@O       .@@@@@]]]/@@@@@/  .@@@@@@@@@@@@@@^      =@@@@@@@`           =@@@^        .\@@@@@@@@@@]                       =@@@@@@@@@@@/.     =@@@@O          =@@@@@.    =@@@@O .@@@@@^  /@@@@@@^
                     =@@@@O       .@@@@@@@@@@@@@/.  .@@@@@@@@@@@@@@^      /@@@@@@@`           ,@@@.          .\@@@@@@@@@@^                     =@@@@@@@@@@@@@\.   =@@@@O          =@@@@@.    =@@@@O .@@@@@^  O@@@@@@^
                     =@@@@O       .@@@@@@@@@@@@^    .@@@@@.   =@@@@^    ./@@@@@@@@@`                             .[\@@@@@@.                    =@@@@^    =@@@@^   =@@@@O          .@@@@@^    @@@@@^  @@@@@\  ,[\@@@@^
                     =@@@@O       .@@@@@. ,@@@@@^   .@@@@@.   =@@@@^   .@@@@@`,@@@@@^                       ,@@\`...=@@@@@.                    =@@@@^  .,@@@@@^   =@@@@O.........  =@@@@@`../@@@@@.  ,@@@@@@]..=@@@@^
                     =@@@@O       .@@@@@.  ,@@@@@\  .@@@@@.   =@@@@^  ,@@@@@^  ,@@@@@\.                   .@@@@@@@@@@@@@@^                     =@@@@@@@@@@@@@@.   =@@@@@@@@@@@@@.  .\@@@@@@@@@@@@`    ,@@@@@@@@@@@@@^
T
TRHX 已提交
10
                     =@@@@O       .@@@@@.   ,@@@@@\ .@@@@@.   =@@@@^ ,@@@@@^    ,@@@@@\.                   .[@@@@@@@@@@[.                      =@@@@@@@@@@@/`     =@@@@@@@@@@@@@.    .\@@@@@@@@`        ,\@@@@@@-->
T
TRHX 已提交
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  
  <title>一台电脑使用两个/多个GitHub账号部署两个/多个Hexo博客 | TRHX&#39;S BLOG</title>
  
  <meta name="keywords" content="大学生 软件工程 Java Python">
  
  
  <meta name="description" content="一个大学生用于自学的个人博客">
  

  
  <link rel="alternate" href="/atom.xml" title="TRHX'S BLOG">
  

  <meta name="HandheldFriendly" content="True" />
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <!-- meta -->
  
  
  <meta name='theme-color' content='#f24e32'>
  <meta name='msapplication-TileColor' content='#f24e32'>
  <meta name='msapplication-config' content='https://cdn.jsdelivr.net/gh/xaoxuu/assets@master/favicon/favicons/browserconfig.xml'>
  

  <!-- link -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
  
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-waves@0.7.6/dist/waves.min.css">
  
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.6.3/css/all.min.css">
  
  
  <link rel='shortcut icon' type='image/x-icon' href='https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@2.0.1/images/favicon.ico'>
  <link rel='icon' type='image/x-icon' sizes='32x32' href='https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@2.0.1/images/favicon-32x32.png'>
  <link rel='apple-touch-icon' type='image/png' sizes='180x180' href='https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@2.0.1/images/apple-touch-icon.png'>
  <link rel='mask-icon' color='#f24e32' href='https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@2.0.1/images/mask-icon.png'>
  <link rel='manifest' href='https://cdn.jsdelivr.net/gh/xaoxuu/assets@master/favicon/favicons/site.webmanifest'>
  

  

  
T
TRHX 已提交
58
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@2.0.8/css/style.css">
T
TRHX 已提交
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
  

  <script>
    function setLoadingBarProgress(num) {
      document.getElementById('loading-bar').style.width=num+"%";
    }
  </script>

  
  
    <!-- ba -->
    <script>
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?df0bc7c6bdbd80356ba4db429724ccad";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
    </script>
  
</head>

<body>
  
  
  <div class="cover-wrapper">
    <cover class='cover post half'>
      
        
  <h1 class='title'>TRHX'S BLOG</h1>


  <div class="m_search">
    <form name="searchform" class="form u-search-form">
      <input type="text" class="input u-search-input" placeholder="Search..." />
      <i class="icon fas fa-search fa-fw"></i>
    </form>
  </div>

<div class='menu navgation'>
  <ul class='h-list'>
    
      
        <li>
          <a class="nav home" href="/"
            
            
            id="home">
            <i class='fas fa-home fa-fw'></i>&nbsp;主页
          </a>
        </li>
      
        <li>
          <a class="nav home" href="/archives/"
            
            
            id="archives">
            <i class='fas fa-archive fa-fw'></i>&nbsp;归档
          </a>
        </li>
      
        <li>
          <a class="nav home" href="/categories/"
            
            
            id="categories">
            <i class='fas fa-folder-open fa-fw'></i>&nbsp;分类
          </a>
        </li>
      
        <li>
          <a class="nav home" href="/tags/"
            
            
            id="tags">
            <i class='fas fa-tags fa-fw'></i>&nbsp;标签
          </a>
        </li>
      
        <li>
          <a class="nav home" href="/friends/"
            
            
            id="friends">
            <i class='fas fa-users fa-fw'></i>&nbsp;朋友
          </a>
        </li>
      
T
TRHX 已提交
148
        <li>
T
TRHX 已提交
149
          <a class="nav home" href="/comments/"
T
TRHX 已提交
150 151
            
            
T
TRHX 已提交
152 153
            id="comments">
            <i class='fas fa-comments fa-fw'></i>&nbsp;留言
T
TRHX 已提交
154 155 156
          </a>
        </li>
      
T
TRHX 已提交
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
    
  </ul>
</div>

      
    </cover>
    <header class="l_header pure">
  <div id="loading-bar-wrapper">
    <div id="loading-bar" class="pure"></div>
  </div>

	<div class='wrapper'>
		<div class="nav-main container container--flex">
      <a class="logo flat-box" href='/' >
        
          TRHX'S BLOG
        
      </a>
			<div class='menu navgation'>
				<ul class='h-list'>
          
  					
  						<li>
								<a class="nav flat-box" href="/"
                  
                  
                  id="home">
									<i class='fas fa-home fa-fw'></i>&nbsp;主页
								</a>
							</li>
      			
  						<li>
								<a class="nav flat-box" href="/archives/"
                  
                    rel="nofollow"
                  
                  
                  id="archives">
									<i class='fas fa-archive fa-fw'></i>&nbsp;归档
								</a>
							</li>
      			
  						<li>
								<a class="nav flat-box" href="/friends/"
                  
                  
                  id="friends">
									<i class='fas fa-users fa-fw'></i>&nbsp;朋友
								</a>
							</li>
      			
  						<li>
T
TRHX 已提交
209
								<a class="nav flat-box" href="/comments/"
T
TRHX 已提交
210 211
                  
                  
T
TRHX 已提交
212 213
                  id="comments">
									<i class='fas fa-comments fa-fw'></i>&nbsp;留言
T
TRHX 已提交
214 215 216 217
								</a>
							</li>
      			
  						<li>
T
TRHX 已提交
218
								<a class="nav flat-box" href="/about/"
T
TRHX 已提交
219 220 221 222
                  
                  
                    target="_blank"
                  
T
TRHX 已提交
223 224
                  id="about">
									<i class='fas fa-info-circle fa-fw'></i>&nbsp;关于
T
TRHX 已提交
225 226 227 228
								</a>
							</li>
      			
  						<li>
T
TRHX 已提交
229
								<a class="nav flat-box" href="/box/"
T
TRHX 已提交
230 231 232 233
                  
                  
                    target="_blank"
                  
T
TRHX 已提交
234 235
                  id="box">
									<i class='fas fa-tools fa-fw'></i>&nbsp;百宝箱
T
TRHX 已提交
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325
								</a>
							</li>
      			
      		
				</ul>
			</div>

			
				<div class="m_search">
					<form name="searchform" class="form u-search-form">
						<input type="text" class="input u-search-input" placeholder="搜索" />
						<i class="icon fas fa-search fa-fw"></i>
					</form>
				</div>
			
			<ul class='switcher h-list'>
				
					<li class='s-search'><a class="fas fa-search fa-fw" href='javascript:void(0)'></a></li>
				
				<li class='s-menu'><a class="fas fa-bars fa-fw" href='javascript:void(0)'></a></li>
			</ul>
		</div>

		<div class='nav-sub container container--flex'>
			<a class="logo flat-box"></a>
			<ul class='switcher h-list'>
				<li class='s-comment'><a class="flat-btn fas fa-comments fa-fw" href='javascript:void(0)'></a></li>
        
          <li class='s-toc'><a class="flat-btn fas fa-list fa-fw" href='javascript:void(0)'></a></li>
        
			</ul>
		</div>
	</div>
</header>
	<aside class="menu-phone">
    <header>
		<nav class="menu navgation">
      <ul>
        
          
            <li>
							<a class="nav flat-box" href="/"
                
                
                id="home">
								<i class='fas fa-home fa-fw'></i>&nbsp;主页
							</a>
            </li>
          
            <li>
							<a class="nav flat-box" href="/tags/"
                
                  rel="nofollow"
                
                
                id="tags">
								<i class='fas fa-tags fa-fw'></i>&nbsp;标签
							</a>
            </li>
          
            <li>
							<a class="nav flat-box" href="/archives/"
                
                  rel="nofollow"
                
                
                id="archives">
								<i class='fas fa-archive fa-fw'></i>&nbsp;归档
							</a>
            </li>
          
            <li>
							<a class="nav flat-box" href="/friends/"
                
                
                id="friends">
								<i class='fas fa-users fa-fw'></i>&nbsp;朋友
							</a>
            </li>
          
            <li>
							<a class="nav flat-box" href="/atom.xml"
                
                
                id="atom.xml">
								<i class='fas fa-rss fa-fw'></i>&nbsp;RSS
							</a>
            </li>
          
            <li>
T
TRHX 已提交
326
							<a class="nav flat-box" href="https://blog.csdn.net/qq_36759224"
T
TRHX 已提交
327 328
                
                
T
TRHX 已提交
329
                id="https:blog.csdn.netqq_36759224">
T
TRHX 已提交
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361
								<i class='fab fa-cuttlefish fa-fw'></i>&nbsp;CSDN
							</a>
            </li>
          
       
      </ul>
		</nav>
    </header>
	</aside>
<script>setLoadingBarProgress(40);</script>

  </div>


  <div class="l_body">
    <div class='body-wrapper'>
      <div class='l_main'>
  

  
    <article id="post" class="post white-box article-type-post" itemscope itemprop="blogPost">
      


  <section class='meta'>
    
    
    <div class="meta" id="header-meta">
      
        
  
    <h1 class="title">
T
TRHX 已提交
362
      <a href="/2019/01/18/A16-deploy-two-or-more-hexo-blogs/">
T
TRHX 已提交
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451
        一台电脑使用两个/多个GitHub账号部署两个/多个Hexo博客
      </a>
    </h1>
  


      
      <div class='new-meta-box'>
        
          
        
          
            
  <div class='new-meta-item author'>
    <a href="https://www.itrhx.com" rel="nofollow">
      
        <i class="fas fa-user" aria-hidden="true"></i>
      
      <p>TRHX'BLOG</p>
    </a>
  </div>


          
        
          
            <div class="new-meta-item date">
  <a class='notlink'>
    <i class="fas fa-calendar-alt" aria-hidden="true"></i>
    <p>2019-01-18</p>
  </a>
</div>

          
        
          
            
  
  <div class='new-meta-item category'>
    <a href='/categories/Hexo/' rel="nofollow">
      <i class="fas fa-folder-open" aria-hidden="true"></i>
      <p>Hexo</p>
    </a>
  </div>


          
        
          
            
  
  <div class="new-meta-item meta-tags"><a class="tag" href="/tags/Hexo/" rel="nofollow"><i class="fas fa-tags" aria-hidden="true"></i>&nbsp;<p>Hexo</p></a></div> <div class="new-meta-item meta-tags"><a class="tag" href="/tags/Github/" rel="nofollow"><i class="fas fa-tags" aria-hidden="true"></i>&nbsp;<p>Github</p></a></div>


          
        
          
            
  
    <div class="new-meta-item browse busuanzi">
      <a class='notlink'>
        <i class="fas fa-eye" aria-hidden="true"></i>
        <p>
          <span id="busuanzi_value_page_pv">
            <i class="fas fa-spinner fa-spin fa-fw" aria-hidden="true"></i>
          </span>
        </p>
      </a>
    </div>
  


          
        
          
            

          
        
      </div>
      
        <hr>
      
    </div>
  </section>


      <section class="article typo">
        <div class="article-entry" itemprop="articleBody">
T
TRHX 已提交
452
          <p><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A16/01.png" alt="01"><br>由于个人原因需要在一台电脑上部署两个Hexo博客,本来以为挺简单,没想到问题重重,首先是一个GitHub账号只能搭建一个Hexo博客,因此就需要使用其他GitHub账号;其次是一台电脑绑定两个GitHub账号,则需要两对公钥,在处理第二个问题时遇到的问题比较多,因为对这方面一窍不通,还是小白,所以折腾了一下午才解决,网上好多教程我都看不懂,觉得不(自)够(己)详(太)细(笨),因此详细记录一下</p>
T
TRHX 已提交
453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506
<a id="more"></a>
<p>原理分析:</p>
<blockquote>
<ul>
<li>SSH的公钥是GitHub作为本地仓库和远程仓库连接的唯一标识,一个公钥只能对应一个GitHub账户,如果将一个相同的公钥上传到不同的GitHub账户,GitHub则无法做出辨识,进而导致错误</li>
<li>一台电脑,可以生成多对公私钥,可以通过配置,将不同的公钥上传到不同的GitHub账号,那么就不存在单个公钥绑定多个GitHub账号的情况存在了</li>
</ul>
</blockquote>
<p>相关问题报错:</p>
<blockquote>
<ul>
<li>同一台电脑部署第二个Hexo博客执行<code>hexo g -d</code>时报错:<code>ERROR: Permission to xxxxxx/xxxxxx.github.io.git denied to xxxxxx.</code></li>
<li>添加新的 SSH 密钥 到 SSH agent 执行<code>ssh-add xxx</code>时报错:<code>Could not open a connection to your authentication agent.</code></li>
<li>单独设置用户名/邮箱时报错:<code>fatal: not in a git directory</code></li>
</ul>
</blockquote>
<hr>
<p>以下是详细过程:<br>前提:假设你的第二个博客相关配置操作已经顺利完成,但使用<code>hexo g -d</code>命令部署到 GitHub 上时报错:<code>ERROR: Permission to xxxxxx/xxxxxx.github.io.git denied to xxxxxx.</code></p>
<h1 id="查看当前密钥"><a href="#查看当前密钥" class="headerlink" title="- 查看当前密钥"></a>- 查看当前密钥</h1><p>首先我们打开终端输入<code>ls ~/.ssh/</code>可以查看当前已有的密钥,显示<code>id_rsa</code><code>id_rsa_pub</code>说明已经有一对密钥</p>
<h1 id="创建新的密钥"><a href="#创建新的密钥" class="headerlink" title="- 创建新的密钥"></a>- 创建新的密钥</h1><p>首先使用以下命令进入 SSH根目录下:<br><figure class="highlight jboss-cli"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">cd</span> ~<span class="string">/.ssh/</span></span><br></pre></td></tr></table></figure></p>
<h2 id="方法一"><a href="#方法一" class="headerlink" title="方法一"></a>方法一</h2><p>直接使用以下命令创建新密钥,然后两次回车即可:<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ssh-keygen -t rsa -f  ~/.ssh/这里是新密钥名称 -C <span class="string">"这里是你的邮箱"</span></span><br></pre></td></tr></table></figure></p>
<p>注意区别新密钥名称和旧密钥名称,不要相同!!!</p>
<h2 id="方法二"><a href="#方法二" class="headerlink" title="方法二"></a>方法二</h2><p>使用下面命令行创建新密钥:<br><figure class="highlight mathematica"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ssh-keygen -t rsa -<span class="keyword">C</span> <span class="string">"这里是你的邮箱"</span></span><br></pre></td></tr></table></figure></p>
<p>回车后会出现:<br><figure class="highlight vbnet"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">Generating <span class="keyword">public</span>/<span class="keyword">private</span> rsa <span class="keyword">key</span> pair.  </span><br><span class="line">Enter file <span class="keyword">in</span> which <span class="keyword">to</span> save the <span class="keyword">key</span> (/c/Users/you/.ssh/id_rsa):</span><br></pre></td></tr></table></figure></p>
<p>注意此时需要你输入新密钥的名称,同样要注意区别新密钥名称和旧密钥名称,不要相同!!!之后再两次回车,新密钥创建完毕!</p>
<h1 id="配置config"><a href="#配置config" class="headerlink" title="- 配置config"></a>- 配置config</h1><p>查看你的.ssh/根路径下, 有没有config文件,( 比如我的路径为C:\Users\Lenovo.ssh)没有则使用以下命令创建一个config文件:<br><figure class="highlight lsl"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="section">touch</span> config</span><br></pre></td></tr></table></figure></p>
<p>用记事本或者其他工具打开config文件(注意config文件是没有任何后缀名的),写入以下配置:</p>
<figure class="highlight crmsh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#第一个账号,默认使用的账号,不用做任何更改</span></span><br><span class="line">Host github.com</span><br><span class="line">	HostName github.com</span><br><span class="line">	<span class="keyword">User</span> <span class="title">git</span></span><br><span class="line">	IdentityFile ~/.ssh/id_rsa</span><br><span class="line">	</span><br><span class="line"><span class="comment">#第二个新账号,#"xxxxxx"为前缀名,可以任意设置,要记住,后面需要用到</span></span><br><span class="line">Host xxxxxx.github.com</span><br><span class="line">	HostName github.com</span><br><span class="line">	<span class="keyword">User</span> <span class="title">git</span></span><br><span class="line">	IdentityFile ~/.ssh/这里是你创建的新密钥的名称</span><br></pre></td></tr></table></figure>
<h1 id="设置新GitHub账户SSH-key"><a href="#设置新GitHub账户SSH-key" class="headerlink" title="- 设置新GitHub账户SSH key"></a>- 设置新GitHub账户SSH key</h1><p>输入以下命令复制你创建的公钥:<br><figure class="highlight jboss-cli"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">clip &lt; ~<span class="string">/.ssh/</span>这里是你创建的新密钥的名称<span class="string">.pub</span></span><br></pre></td></tr></table></figure></p>
<p>也可以直接在.ssh目录下找到你创建的新的公钥,文件名为<code>新密钥的名称.pub</code>,(比如我的是<code>trhx_rsa.pub</code>),用记事本打开,复制里面的内容,然后打开你的新GitHub账号主页,依次进入Settings —&gt; SSH and GPG keys —&gt; New SSH key,将刚复制的内容粘贴到Key那里,Title可以随便填,点击Add Key保存。</p>
<h1 id="清空本地的-SSH-缓存,添加新的-SSH-密钥-到-SSH-agent中"><a href="#清空本地的-SSH-缓存,添加新的-SSH-密钥-到-SSH-agent中" class="headerlink" title="- 清空本地的 SSH 缓存,添加新的 SSH 密钥 到 SSH agent中"></a>- 清空本地的 SSH 缓存,添加新的 SSH 密钥 到 SSH agent中</h1><p>使用命令<code>cd ~/.ssh</code>cd到.ssh根目录下,依次执行以下命令:</p>
<figure class="highlight dockerfile"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">ssh-<span class="keyword">add</span><span class="bash"> -D</span></span><br><span class="line"><span class="bash">ssh-add xxxxxx <span class="comment">#旧密钥名称,一般是id_rsa</span></span></span><br><span class="line"><span class="bash">ssh-add xxxxxx <span class="comment">#新创建的密钥名称</span></span></span><br></pre></td></tr></table></figure>
<p>如果执行以上命令出现错误:<code>Could not open a connection to your authentication agent.</code>,那么就需要先执行<code>ssh-agent bash</code>,再执行以上命令</p>
<h1 id="验证配置是否成功"><a href="#验证配置是否成功" class="headerlink" title="- 验证配置是否成功"></a>- 验证配置是否成功</h1><p>依次执行以下命令,第一个为默认ssh_key验证;第二个为新的ssh_key验证,其中“xxxxxx”为你先前在config文件中的命名<br><figure class="highlight stylus"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">ssh -T git@github.com</span><br><span class="line">ssh -T git@xxxxxxx<span class="selector-class">.github</span><span class="selector-class">.com</span></span><br></pre></td></tr></table></figure></p>
<p>依次显示以下信息, 则说明配置成功:<br><figure class="highlight ada"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Hi 你的用户名! You<span class="symbol">'ve</span> successfully authenticated, but GitHub does <span class="keyword">not</span> provide shell <span class="keyword">access</span>.</span><br></pre></td></tr></table></figure></p>
<h1 id="取消全局用户名-邮箱配置,单独设置用户名-邮箱"><a href="#取消全局用户名-邮箱配置,单独设置用户名-邮箱" class="headerlink" title="- 取消全局用户名/邮箱配置,单独设置用户名/邮箱"></a>- 取消全局用户名/邮箱配置,单独设置用户名/邮箱</h1><p>执行如下命令,取消全局用户名和邮箱配置(如果已经设置了全局的话):</p>
<figure class="highlight dsconfig"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">git </span><span class="string">config </span><span class="built_in">--global</span> <span class="built_in">--unset</span> <span class="string">user.</span><span class="string">name</span></span><br><span class="line"><span class="string">git </span><span class="string">config </span><span class="built_in">--global</span> <span class="built_in">--unset</span> <span class="string">user.</span><span class="string">email</span></span><br></pre></td></tr></table></figure>
<p>分别进入你的两个Hexo博客.git目录下执行以下命令单独设置用户名/邮箱:<br><figure class="highlight stylus"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git config user<span class="selector-class">.name</span> <span class="string">"这里是用户名"</span></span><br><span class="line">git config user<span class="selector-class">.email</span> <span class="string">"这里是你的邮箱"</span></span><br></pre></td></tr></table></figure></p>
<p>如果此时报错:<code>fatal: not in a git directory</code>,说明你没有进入.git目录下,具体路径:\Hexo\.deploy_git\.git,.git目录是隐藏的,需要你设置隐藏目录可见</p>
<p>执行以下命令可以查看设置是否成功<br><figure class="highlight lua"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">config</span> <span class="comment">--list</span></span><br></pre></td></tr></table></figure></p>
<h1 id="hexo-配置文件修改git地址"><a href="#hexo-配置文件修改git地址" class="headerlink" title="- hexo 配置文件修改git地址"></a>- hexo 配置文件修改git地址</h1><p>打开你的第二个博客Hexo目录下的_config.yml文件,找到deploy关键字,写入以下配置并保存:<br><figure class="highlight less"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="attribute">deploy</span>:</span><br><span class="line">  <span class="attribute">type</span>: git</span><br><span class="line">  <span class="attribute">repository</span>: git<span class="variable">@xxxxxx</span>.github.<span class="attribute">com</span>:你的用户名/你的用户名.github.io.git</span><br><span class="line">  <span class="attribute">branch</span>: master</span><br></pre></td></tr></table></figure></p>
<p>比如我的配置:<br><figure class="highlight less"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="attribute">deploy</span>:</span><br><span class="line">  <span class="attribute">type</span>: git</span><br><span class="line">  <span class="attribute">repository</span>: git<span class="variable">@love109</span>.github.<span class="attribute">com</span>:love109/love109.github.io.git</span><br><span class="line">  <span class="attribute">branch</span>: master</span><br></pre></td></tr></table></figure></p>
<p>大功告成,再次执行hexo g -d就能成功将新的博客部署到 Github 上了</p>

        </div>
        
          


  <section class='meta' id="footer-meta">
    <hr>
    <div class='new-meta-box'>
      
        
T
TRHX 已提交
507
          <div class="new-meta-item date" itemprop="dateUpdated" datetime="2019-07-31T19:28:36+08:00">
T
TRHX 已提交
508 509
  <a class='notlink'>
    <i class="fas fa-clock" aria-hidden="true"></i>
T
TRHX 已提交
510
    <p>最后更新于 2019年7月31日</p>
T
TRHX 已提交
511 512 513 514 515 516 517 518 519 520 521 522 523
  </a>
</div>

        
      
        
          
  <div class="new-meta-item share -mob-share-list">
  <div class="-mob-share-list share-body">
    
      
        <a class="-mob-share-qq" title="QQ好友" rel="external nofollow noopener noreferrer"
          
T
TRHX 已提交
524
          href="http://connect.qq.com/widget/shareqq/index.html?url=https://www.itrhx.com/2019/01/18/A16-deploy-two-or-more-hexo-blogs/&title=一台电脑使用两个/多个GitHub账号部署两个/多个Hexo博客 | TRHX'S BLOG&summary=由于个人原因需要在一台电脑上部署两个Hexo博客,本来以为挺简单,没想到问题重重,首先是一个GitHub账号只能搭建一个Hexo博客,因此就需要使用其他GitHub账号;其次是一台电脑绑定两个GitHub账号,则需要两对公钥,在处理第二个问题时遇到的问题比较多,因为对这方面一窍不通,还是小白,所以折腾了一下午才解决,网上好多教程我都看不懂,觉得不(自)够(己)详(太)细(笨),因此详细记录一下"
T
TRHX 已提交
525 526 527 528 529 530 531 532 533 534 535
          
          >
          
            <img src="https://cdn.jsdelivr.net/gh/xaoxuu/assets@19.1.9/logo/128/qq.png">
          
        </a>
      
    
      
        <a class="-mob-share-qzone" title="QQ空间" rel="external nofollow noopener noreferrer"
          
T
TRHX 已提交
536
          href="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=https://www.itrhx.com/2019/01/18/A16-deploy-two-or-more-hexo-blogs/&title=一台电脑使用两个/多个GitHub账号部署两个/多个Hexo博客 | TRHX'S BLOG&summary=由于个人原因需要在一台电脑上部署两个Hexo博客,本来以为挺简单,没想到问题重重,首先是一个GitHub账号只能搭建一个Hexo博客,因此就需要使用其他GitHub账号;其次是一台电脑绑定两个GitHub账号,则需要两对公钥,在处理第二个问题时遇到的问题比较多,因为对这方面一窍不通,还是小白,所以折腾了一下午才解决,网上好多教程我都看不懂,觉得不(自)够(己)详(太)细(笨),因此详细记录一下"
T
TRHX 已提交
537 538 539 540 541 542 543 544 545
          
          >
          
            <img src="https://cdn.jsdelivr.net/gh/xaoxuu/assets@19.1.9/logo/128/qzone.png">
          
        </a>
      
    
      
T
TRHX 已提交
546
        <a class='qrcode' rel="external nofollow noopener noreferrer" href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAN4AAADeCAAAAAB3DOFrAAACwUlEQVR42u3aQW7cMBAEwP3/px0gJwfxKt0cTrCH0mlhSKRKBsRRD1+v+Pj6fXz//f34+5znvzz//fl4bRx4eHh4R7f+PNw7XvsI8hnfjdmOgIeHh7fHSxaD51tMqPkszyMko+Hh4eF9Au/sQcwL93wWPDw8vE/jJUvCWbiQxBZ4eHh4n8ZLpm+j20lZnAci17IWPDw8vIUu0uf8Xu/v4eHh4R111c+K4KQszheJ0X3i4eHhLfCSiLYtedstBRNqtGDg4eHh/RdeckPtSzwJjtsHmnwA4OHh4e3x8pf7WYsrj32T0rxY3vDw8PAWeO0mqrPAog0m8pL9WiaNh4eHd6lP1JImG6Qmj+Dyzgg8PDy8x95QGyichQtnRfbZOH/09/Dw8PCu8tppkld8fs6tBlj9lYCHh4d3Nc+8FaHOS+2k6RVtGsDDw8O7ymtDgUmD/6zNNgkp8PDw8DZ4eTzalsKTbVXPoyUPEQ8PD2+Pdys+mCwVk00DRX8PDw8P7xJvvlmqvdF5cJyX3Xh4eHjbvHlo27bZJktCtAjh4eHhLfDyAvray/poE0CyCP1jTDw8PLyrvMl2gbahlYPbttzbu8XDw8Nb4yXBxOSqtrVWrGnPSxQeHh7eVV7+km03VLXbBSbUt2fi4eHhLfDyy/KGVtvmzxehw4ADDw8Pb4GXBLJtoZwHr5MCvY2D8fDw8G7x2lvJX8fthoB28Yj+b3h4eHjLvLZ9dbZxKinT81Cj+GLAw8PDG/O+yqMtu9sF4G68i4eHh7fBa1+4k4Ukaba1ZybxMR4eHt4G7ywCyK+dxBNn1/7wxYCHh4e3wMsXg7b4bjcitGsXHh4e3ufz8nA2Gb/dUpDMXjfA8PDw8NZ4yUs8x0zOr8MIPDw8vAVeXhwfTlO2vs4eyiufEg8PD2/6RX/YAEummUfDbUSCh4eHt8b7BRp8+T7oE/MKAAAAAElFTkSuQmCC'>
T
TRHX 已提交
547 548 549 550 551 552 553 554 555
        
          <img src="https://cdn.jsdelivr.net/gh/xaoxuu/assets@19.1.9/logo/128/wechat.png">
        
        </a>
      
    
      
        <a class="-mob-share-weibo" title="微博" rel="external nofollow noopener noreferrer"
          
T
TRHX 已提交
556
          href="http://service.weibo.com/share/share.php?url=https://www.itrhx.com/2019/01/18/A16-deploy-two-or-more-hexo-blogs/&title=一台电脑使用两个/多个GitHub账号部署两个/多个Hexo博客 | TRHX'S BLOG&summary=由于个人原因需要在一台电脑上部署两个Hexo博客,本来以为挺简单,没想到问题重重,首先是一个GitHub账号只能搭建一个Hexo博客,因此就需要使用其他GitHub账号;其次是一台电脑绑定两个GitHub账号,则需要两对公钥,在处理第二个问题时遇到的问题比较多,因为对这方面一窍不通,还是小白,所以折腾了一下午才解决,网上好多教程我都看不懂,觉得不(自)够(己)详(太)细(笨),因此详细记录一下"
T
TRHX 已提交
557 558 559 560 561 562 563 564 565
          
          >
          
            <img src="https://cdn.jsdelivr.net/gh/xaoxuu/assets@19.1.9/logo/128/weibo.png">
          
        </a>
      
    
      
T
TRHX 已提交
566
        <a class='qrcode' rel="external nofollow noopener noreferrer" href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAN4AAADeCAAAAAB3DOFrAAACwUlEQVR42u3aQW7cMBAEwP3/px0gJwfxKt0cTrCH0mlhSKRKBsRRD1+v+Pj6fXz//f34+5znvzz//fl4bRx4eHh4R7f+PNw7XvsI8hnfjdmOgIeHh7fHSxaD51tMqPkszyMko+Hh4eF9Au/sQcwL93wWPDw8vE/jJUvCWbiQxBZ4eHh4n8ZLpm+j20lZnAci17IWPDw8vIUu0uf8Xu/v4eHh4R111c+K4KQszheJ0X3i4eHhLfCSiLYtedstBRNqtGDg4eHh/RdeckPtSzwJjtsHmnwA4OHh4e3x8pf7WYsrj32T0rxY3vDw8PAWeO0mqrPAog0m8pL9WiaNh4eHd6lP1JImG6Qmj+Dyzgg8PDy8x95QGyichQtnRfbZOH/09/Dw8PCu8tppkld8fs6tBlj9lYCHh4d3Nc+8FaHOS+2k6RVtGsDDw8O7ymtDgUmD/6zNNgkp8PDw8DZ4eTzalsKTbVXPoyUPEQ8PD2+Pdys+mCwVk00DRX8PDw8P7xJvvlmqvdF5cJyX3Xh4eHjbvHlo27bZJktCtAjh4eHhLfDyAvray/poE0CyCP1jTDw8PLyrvMl2gbahlYPbttzbu8XDw8Nb4yXBxOSqtrVWrGnPSxQeHh7eVV7+km03VLXbBSbUt2fi4eHhLfDyy/KGVtvmzxehw4ADDw8Pb4GXBLJtoZwHr5MCvY2D8fDw8G7x2lvJX8fthoB28Yj+b3h4eHjLvLZ9dbZxKinT81Cj+GLAw8PDG/O+yqMtu9sF4G68i4eHh7fBa1+4k4Ukaba1ZybxMR4eHt4G7ywCyK+dxBNn1/7wxYCHh4e3wMsXg7b4bjcitGsXHh4e3ufz8nA2Gb/dUpDMXjfA8PDw8NZ4yUs8x0zOr8MIPDw8vAVeXhwfTlO2vs4eyiufEg8PD2/6RX/YAEummUfDbUSCh4eHt8b7BRp8+T7oE/MKAAAAAElFTkSuQmCC'>
T
TRHX 已提交
567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591
        
          <img src="https://cdn.jsdelivr.net/gh/xaoxuu/assets@19.1.9/logo/128/qrcode.png">
        
        </a>
      
    
  </div>
</div>



        
      
    </div>
  </section>


        
        
            <div class="prev-next">
                
                    <section class="prev">
                        <span class="art-item-left">
                            <h6><i class="fas fa-chevron-left" aria-hidden="true"></i>&nbsp;上一页</h6>
                            <h4>
T
TRHX 已提交
592
                                <a href="/2019/02/05/A17-happy-new-year/" rel="prev" title="新年快乐!">
T
TRHX 已提交
593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611
                                  
                                      新年快乐!
                                  
                                </a>
                            </h4>
                            
                                
                                <h6 class="tags">
                                    <a class="tag" href="/tags/BLOG/"><i class="fas fa-tags fa-fw" aria-hidden="true"></i>BLOG</a>
                                </h6>
                            
                        </span>
                    </section>
                
                
                    <section class="next">
                        <span class="art-item-right" aria-hidden="true">
                            <h6>下一页&nbsp;<i class="fas fa-chevron-right" aria-hidden="true"></i></h6>
                            <h4>
T
TRHX 已提交
612
                                <a href="/2018/11/16/A15-Python3-study-notes-C09/" rel="prev" title="Python3 自学笔记 C09">
T
TRHX 已提交
613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838
                                    
                                        Python3 自学笔记 C09
                                    
                                </a>
                            </h4>
                            
                                
                                <h6 class="tags">
                                    <a class="tag" href="/tags/文件/"><i class="fas fa-tags fa-fw" aria-hidden="true"></i>文件</a> <a class="tag" href="/tags/异常/"><i class="fas fa-tags fa-fw" aria-hidden="true"></i>异常</a>
                                </h6>
                            
                        </span>
                    </section>
                
            </div>
        
      </section>
    </article>
  

  
    <!-- 显示推荐文章和评论 -->



  <article class="post white-box comments">
    <section class="article typo">
      <h4><i class="fas fa-comments fa-fw" aria-hidden="true"></i>&nbsp;评论</h4>
      
      
      
        <section id="comments">
          <div id="gitalk-container"></div>
        </section>
      
      
    </section>
  </article>


  




<!-- 根据页面mathjax变量决定是否加载MathJax数学公式js -->



  <script>
    window.subData = {
      title: '一台电脑使用两个/多个GitHub账号部署两个/多个Hexo博客',
      tools: true
    }
  </script>


</div>
<aside class='l_side'>
  
    
    
      
        
          
          
            <section class='widget author'>
  <div class='content pure'>
    
      <div class='avatar'>
        <img class='avatar' src='https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@2.0.4/images/trhx.png'/>
      </div>
    
    
      <div class='text'>
        
          <h2>TRHX'S BLOG</h2>
        
        
          <p>求知若饥 虚心若愚</p>

        
        
      </div>
    
    
      <div class="social-wrapper">
        
          
            <a href="https://github.com/TRHX"
              class="social fab fa-github flat-btn"
              target="_blank"
              rel="external nofollow noopener noreferrer">
            </a>
          
        
          
            <a href="https://www.zhihu.com/people/tan-70-56/activities"
              class="social fab fa-zhihu flat-btn"
              target="_blank"
              rel="external nofollow noopener noreferrer">
            </a>
          
        
          
            <a href="mailto:admin@itrhx.com"
              class="social fas fa-envelope flat-btn"
              target="_blank"
              rel="external nofollow noopener noreferrer">
            </a>
          
        
          
            <a href="http://wpa.qq.com/msgrd?v=3&uin=2273902448&site=qq&menu=yes"
              class="social fab fa-qq flat-btn"
              target="_blank"
              rel="external nofollow noopener noreferrer">
            </a>
          
        
      </div>
    
    <!-- 彩色滚动字体-->
    <div id="binft" align="center"></div>
    <script>
      var binft = function (r) {
        function t() {
          return b[Math.floor(Math.random() * b.length)]
        }  
        function e() {
          return String.fromCharCode(94 * Math.random() + 33)
        }
        function n(r) {
          for (var n = document.createDocumentFragment(), i = 0; r > i; i++) {
            var l = document.createElement("span");
            l.textContent = e(), l.style.color = t(), n.appendChild(l)
          }
          return n
        }
        function i() {
          var t = o[c.skillI];
          c.step ? c.step-- : (c.step = g, c.prefixP < l.length ? (c.prefixP >= 0 && (c.text += l[c.prefixP]), c.prefixP++) : "forward" === c.direction ? c.skillP < t.length ? (c.text += t[c.skillP], c.skillP++) : c.delay ? c.delay-- : (c.direction = "backward", c.delay = a) : c.skillP > 0 ? (c.text = c.text.slice(0, -1), c.skillP--) : (c.skillI = (c.skillI + 1) % o.length, c.direction = "forward")), r.textContent = c.text, r.appendChild(n(c.prefixP < l.length ? Math.min(s, s + c.prefixP) : Math.min(s, t.length - c.skillP))), setTimeout(i, d)
        }
        var l = "",
        o = ["业精于勤,荒于嬉;", "行成于思,毁于随。"].map(function (r) {
        return r + ""
        }),
        a = 2,
        g = 1,
        s = 5,
        d = 75,
        b = ["rgb(110,64,170)", "rgb(150,61,179)", "rgb(191,60,175)", "rgb(228,65,157)", "rgb(254,75,131)", "rgb(255,94,99)", "rgb(255,120,71)", "rgb(251,150,51)", "rgb(226,183,47)", "rgb(198,214,60)", "rgb(175,240,91)", "rgb(127,246,88)", "rgb(82,246,103)", "rgb(48,239,130)", "rgb(29,223,163)", "rgb(26,199,194)", "rgb(35,171,216)", "rgb(54,140,225)", "rgb(76,110,219)", "rgb(96,84,200)"],
        c = {
          text: "",
          prefixP: -s,
          skillI: 0,
          skillP: 0,
          direction: "forward",
          delay: a,
          step: g
        };
        i()
        };
        binft(document.getElementById('binft'));
    </script>
  </div>
</section>

          
        
      
        
          
          
            
  <section class='widget toc-wrapper'>
    
<header class='pure'>
  <div><i class="fas fa-list fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;本文目录</div>
  
    <div class='wrapper'><a class="s-toc rightBtn" rel="external nofollow noopener noreferrer" href="javascript:void(0)"><i class="fas fa-thumbtack fa-fw"></i></a></div>
  
</header>

    <div class='content pure'>
      <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#查看当前密钥"><span class="toc-text">- 查看当前密钥</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#创建新的密钥"><span class="toc-text">- 创建新的密钥</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#方法一"><span class="toc-text">方法一</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#方法二"><span class="toc-text">方法二</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#配置config"><span class="toc-text">- 配置config</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#设置新GitHub账户SSH-key"><span class="toc-text">- 设置新GitHub账户SSH key</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#清空本地的-SSH-缓存,添加新的-SSH-密钥-到-SSH-agent中"><span class="toc-text">- 清空本地的 SSH 缓存,添加新的 SSH 密钥 到 SSH agent中</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#验证配置是否成功"><span class="toc-text">- 验证配置是否成功</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#取消全局用户名-邮箱配置,单独设置用户名-邮箱"><span class="toc-text">- 取消全局用户名/邮箱配置,单独设置用户名/邮箱</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#hexo-配置文件修改git地址"><span class="toc-text">- hexo 配置文件修改git地址</span></a></li></ol>
    </div>
  </section>


          
        
      
        
          
          
            <section class='widget grid'>
  
<header class='pure'>
  <div><i class="fas fa-map-signs fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;站内导航</div>
  
</header>

  <div class='content pure'>
    <ul class="grid navgation">
      
        <li><a class="flat-box" title="/" href="/"
          
          
          id="home">
          
            <i class="fas fa-clock fa-fw" aria-hidden="true"></i>
          
          所有文章
        </a></li>
      
        <li><a class="flat-box" title="/archives/" href="/archives/"
          
          
          id="archives">
          
            <i class="fas fa-archive fa-fw" aria-hidden="true"></i>
          
          文章归档
        </a></li>
      
T
TRHX 已提交
839
        <li><a class="flat-box" title="/atom.xml" href="/atom.xml"
T
TRHX 已提交
840 841 842 843
          
            rel="nofollow"
          
          
T
TRHX 已提交
844
          id="atom.xml">
T
TRHX 已提交
845
          
T
TRHX 已提交
846
            <i class="fas fa-rss fa-fw" aria-hidden="true"></i>
T
TRHX 已提交
847
          
T
TRHX 已提交
848
          RSS订阅
T
TRHX 已提交
849 850 851 852 853 854 855 856 857 858 859 860 861 862
        </a></li>
      
        <li><a class="flat-box" title="/friends/" href="/friends/"
          
            rel="nofollow"
          
          
          id="friends">
          
            <i class="fas fa-link fa-fw" aria-hidden="true"></i>
          
          我的友链
        </a></li>
      
T
TRHX 已提交
863
        <li><a class="flat-box" title="/comments/" href="/comments/"
T
TRHX 已提交
864 865 866 867 868 869
          
            rel="nofollow"
          
          
            target="_blank"
          
T
TRHX 已提交
870
          id="comments">
T
TRHX 已提交
871
          
T
TRHX 已提交
872
            <i class="fas fa-comments fa-fw" aria-hidden="true"></i>
T
TRHX 已提交
873
          
T
TRHX 已提交
874
          留言板
T
TRHX 已提交
875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001
        </a></li>
      
        <li><a class="flat-box" title="/about/" href="/about/"
          
            rel="nofollow"
          
          
          id="about">
          
            <i class="fas fa-info-circle fa-fw" aria-hidden="true"></i>
          
          关于博主
        </a></li>
      
    </ul>
  </div>
</section>

          
        
      
        
          
          
            <section class='widget plain'>
  
<header class='pure'>
  <div><i class="fas fa-comments fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;QQ交流群</div>
  
    <a class="rightBtn"
    
      rel="nofollow"
    
    
      target="_blank"
    
    href="https://jq.qq.com/?_wv=1027&k=5F6HRuG"
    title="https://jq.qq.com/?_wv=1027&k=5F6HRuG">
    <i class="fas fa-paper-plane fa-fw"></i></a>
  
</header>

  <div class='content pure'>
    <p><a href="https://jq.qq.com/?_wv=1027&k=5F6HRuG" target="_blank"><img src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@2.0.5/images/group.png"></a></p>

  </div>
</section>

          
        
      
        
          
          
            <section class='widget plain'>
  
<header class='pure'>
  <div><i class="fas fa-map-marked-alt fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;访客地图</div>
  
    <a class="rightBtn"
    
      rel="nofollow"
    
    
      target="_blank"
    
    href="https://www.revolvermaps.com/"
    title="https://www.revolvermaps.com/">
    <i class="fas fa-info-circle fa-fw"></i></a>
  
</header>

  <div class='content pure'>
    <p><br><center><script type="text/javascript" src="//rf.revolvermaps.com/0/0/4.js?i=5eyl60h41k1&amp;m=6&amp;h=122&amp;c=ff0000&amp;r=30" async="async"></script></center></p>

  </div>
</section>

          
        
      
        
          
          
            <section class='widget plain'>
  
<header class='pure'>
  <div><i class="fas fa-edit fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;域名转让</div>
  
</header>

  <div class='content pure'>
    <p><br>以下闲置域名低价转让,价格非常美丽,给钱就扔,欢迎骚扰:<br><center>52bug.club<br>52bug.xyz<br>52bug.top<br>NeedForSpeed.site</center></p>

  </div>
</section>

          
        
      
        
          
          
            
  <section class='widget category'>
    
<header class='pure'>
  <div><i class="fas fa-folder-open fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;文章分类</div>
  
    <a class="rightBtn"
    
      rel="nofollow"
    
    
    href="/categories/"
    title="categories/">
    <i class="fas fa-expand-arrows-alt fa-fw"></i></a>
  
</header>

    <div class='content pure'>
      <ul class="entry">
        
          <li><a class="flat-box" title="/categories/BLOG/" href="/categories/BLOG/"><div class='name'>BLOG</div><div class='badge'>(3)</div></a></li>
        
          <li><a class="flat-box" title="/categories/CDN/" href="/categories/CDN/"><div class='name'>CDN</div><div class='badge'>(1)</div></a></li>
        
T
TRHX 已提交
1002
          <li><a class="flat-box" title="/categories/Hexo/" href="/categories/Hexo/"><div class='name'>Hexo</div><div class='badge'>(4)</div></a></li>
T
TRHX 已提交
1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013
        
          <li><a class="flat-box" title="/categories/Java/" href="/categories/Java/"><div class='name'>Java</div><div class='badge'>(1)</div></a></li>
        
          <li><a class="flat-box" title="/categories/Linux/" href="/categories/Linux/"><div class='name'>Linux</div><div class='badge'>(2)</div></a></li>
        
          <li><a class="flat-box" title="/categories/Markdown/" href="/categories/Markdown/"><div class='name'>Markdown</div><div class='badge'>(2)</div></a></li>
        
          <li><a class="flat-box" title="/categories/Python3/" href="/categories/Python3/"><div class='name'>Python3</div><div class='badge'>(11)</div></a></li>
        
          <li><a class="flat-box" title="/categories/WEB前端/" href="/categories/WEB前端/"><div class='name'>WEB前端</div><div class='badge'>(2)</div></a></li>
        
T
TRHX 已提交
1014 1015
          <li><a class="flat-box" title="/categories/图床/" href="/categories/图床/"><div class='name'>图床</div><div class='badge'>(1)</div></a></li>
        
T
TRHX 已提交
1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044
      </ul>
    </div>
  </section>


          
        
      
        
          
          
            
  <section class='widget tagcloud'>
    
<header class='pure'>
  <div><i class="fas fa-fire fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;热门标签</div>
  
    <a class="rightBtn"
    
      rel="nofollow"
    
    
    href="/tags/"
    title="tags/">
    <i class="fas fa-expand-arrows-alt fa-fw"></i></a>
  
</header>

    <div class='content pure'>
T
TRHX 已提交
1045
      <a href="/tags/BLOG/" style="font-size: 19px; color: #777">BLOG</a> <a href="/tags/CDN/" style="font-size: 14px; color: #999">CDN</a> <a href="/tags/Deepin/" style="font-size: 14px; color: #999">Deepin</a> <a href="/tags/Elicpse/" style="font-size: 14px; color: #999">Elicpse</a> <a href="/tags/Github/" style="font-size: 14px; color: #999">Github</a> <a href="/tags/Github-Pages/" style="font-size: 14px; color: #999">Github Pages</a> <a href="/tags/HTTPS/" style="font-size: 14px; color: #999">HTTPS</a> <a href="/tags/Hexo/" style="font-size: 24px; color: #555">Hexo</a> <a href="/tags/ICP备案/" style="font-size: 14px; color: #999">ICP备案</a> <a href="/tags/JDBC/" style="font-size: 14px; color: #999">JDBC</a> <a href="/tags/JS-预加载/" style="font-size: 14px; color: #999">JS 预加载</a> <a href="/tags/Markdown/" style="font-size: 19px; color: #777">Markdown</a> <a href="/tags/Material-X/" style="font-size: 14px; color: #999">Material X</a> <a href="/tags/PEP8/" style="font-size: 14px; color: #999">PEP8</a> <a href="/tags/PicGo/" style="font-size: 14px; color: #999">PicGo</a> <a href="/tags/Pygame/" style="font-size: 14px; color: #999">Pygame</a> <a href="/tags/Python/" style="font-size: 19px; color: #777">Python</a> <a href="/tags/SQL-Server-2012/" style="font-size: 14px; color: #999">SQL Server 2012</a> <a href="/tags/Ubuntu/" style="font-size: 14px; color: #999">Ubuntu</a> <a href="/tags/VMware/" style="font-size: 19px; color: #777">VMware</a> <a href="/tags/if语句/" style="font-size: 14px; color: #999">if语句</a> <a href="/tags/input-函数/" style="font-size: 14px; color: #999">input()函数</a> <a href="/tags/instant-page/" style="font-size: 14px; color: #999">instant.page</a> <a href="/tags/jsDeliver/" style="font-size: 14px; color: #999">jsDeliver</a> <a href="/tags/jsDelivr/" style="font-size: 14px; color: #999">jsDelivr</a> <a href="/tags/spfk/" style="font-size: 14px; color: #999">spfk</a> <a href="/tags/while循环/" style="font-size: 14px; color: #999">while循环</a> <a href="/tags/主题个性化/" style="font-size: 14px; color: #999">主题个性化</a> <a href="/tags/公安备案/" style="font-size: 14px; color: #999">公安备案</a> <a href="/tags/函数/" style="font-size: 14px; color: #999">函数</a> <a href="/tags/列表/" style="font-size: 14px; color: #999">列表</a> <a href="/tags/变量/" style="font-size: 14px; color: #999">变量</a> <a href="/tags/图床/" style="font-size: 14px; color: #999">图床</a> <a href="/tags/垃圾/" style="font-size: 14px; color: #999">垃圾</a> <a href="/tags/字典/" style="font-size: 14px; color: #999">字典</a> <a href="/tags/异常/" style="font-size: 14px; color: #999">异常</a> <a href="/tags/技巧/" style="font-size: 14px; color: #999">技巧</a> <a href="/tags/操作列表/" style="font-size: 14px; color: #999">操作列表</a> <a href="/tags/数据类型/" style="font-size: 14px; color: #999">数据类型</a> <a href="/tags/文件/" style="font-size: 14px; color: #999">文件</a> <a href="/tags/模块/" style="font-size: 14px; color: #999">模块</a> <a href="/tags/类/" style="font-size: 14px; color: #999"></a> <a href="/tags/继承/" style="font-size: 14px; color: #999">继承</a> <a href="/tags/编辑器/" style="font-size: 14px; color: #999">编辑器</a>
T
TRHX 已提交
1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172
    </div>
  </section>

          
        
      
        
          
          
            


  <section class='widget music'>
    
<header class='pure'>
  <div><i class="fas fa-compact-disc fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;最近在听</div>
  
    <a class="rightBtn"
    
      rel="external nofollow noopener noreferrer"
    
    
      target="_blank"
    
    href="https://music.163.com/#/playlist?id=2415512873"
    title="https://music.163.com/#/playlist?id=2415512873">
    <i class="far fa-heart fa-fw"></i></a>
  
</header>

    <div class='content pure'>
      
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.7.0/dist/APlayer.min.css">
  <div class="aplayer"
    data-theme="#1BCDFC"
    
    
    data-mode="circulation"
    data-server="netease"
    data-type="playlist"
    data-id="2625522030"
    data-volume="0.7">
  </div>
  <script src="https://cdn.jsdelivr.net/npm/aplayer@1.7.0/dist/APlayer.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/meting@1.1.0/dist/Meting.min.js"></script>


    </div>
  </section>


          
        
      
    

  
</aside>

<footer id="footer" class="clearfix">
  
  
    <div class="social-wrapper">
      
        
          <a href="https://github.com/TRHX"
            class="social fab fa-github flat-btn"
            target="_blank"
            rel="external nofollow noopener noreferrer">
          </a>
        
      
        
          <a href="https://www.zhihu.com/people/tan-70-56/activities"
            class="social fab fa-zhihu flat-btn"
            target="_blank"
            rel="external nofollow noopener noreferrer">
          </a>
        
      
        
          <a href="mailto:admin@itrhx.com"
            class="social fas fa-envelope flat-btn"
            target="_blank"
            rel="external nofollow noopener noreferrer">
          </a>
        
      
        
          <a href="http://wpa.qq.com/msgrd?v=3&amp;uin=2273902448&amp;site=qq&amp;menu=yes"
            class="social fab fa-qq flat-btn"
            target="_blank"
            rel="external nofollow noopener noreferrer">
          </a>
        
      
    </div>
  
  <br>
  Copyright <i class="far fa-copyright"></i> 2018-2019
  <a href="https://www.itrhx.com/" target="_blank"> TRHX&#39;BLOG </a>&nbsp;&nbsp;|&nbsp;&nbsp;
  <img src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@2.0.4/images/icp.png">
  <a href="http://www.beian.miit.gov.cn/" target="_blank">鄂ICP备19003281号-3</a>&nbsp;&nbsp;|&nbsp;&nbsp;
  <!-- 网站运行时间 -->
  <span id="timeDate">正在载入...</span><span id="times"><span><i class="fa fa-spinner fa-spin"> </i></span></span>
  <script>
  var now = new Date(); 
  function createtime() {
    var grt= new Date("08/10/2018 17:38:00");//建站时间2018-08-10
    now.setTime(now.getTime()+250); 
    days = (now - grt ) / 1000 / 60 / 60 / 24; dnum = Math.floor(days); 
    hours = (now - grt ) / 1000 / 60 / 60 - (24 * dnum); hnum = Math.floor(hours); 
    if(String(hnum).length ==1 ){hnum = "0" + hnum;} minutes = (now - grt ) / 1000 /60 - (24 * 60 * dnum) - (60 * hnum); 
    mnum = Math.floor(minutes); if(String(mnum).length ==1 ){mnum = "0" + mnum;} 
    seconds = (now - grt ) / 1000 - (24 * 60 * 60 * dnum) - (60 * 60 * hnum) - (60 * mnum); 
    snum = Math.round(seconds); if(String(snum).length ==1 ){snum = "0" + snum;} 
    document.getElementById("timeDate").innerHTML = "本站已勉强存活了 "
    document.getElementById("times").innerHTML = dnum +"" + hnum + " 小时 " + mnum + "" + snum + ""; 
    /*document.getElementById("times").style.color="#0056FF";*/
    }
    setInterval("createtime()",250);
  </script>&nbsp;&nbsp;|&nbsp;&nbsp;
  <!--
  Powered by <a href="https://hexo.io/zh-cn/" target="_blank" class="codename">Hexo</a>
  Theme <a href="https://xaoxuu.com/wiki/material-x/" target="_blank" class="codename">Material X</a> by <a href="https://xaoxuu.com/" target="_blank" class="codename">xaoxuu</a>&nbsp;&nbsp;|&nbsp;&nbsp;
  <span id="busuanzi_container_site_uv">UV:<span id="busuanzi_value_site_uv"></span></span>&nbsp;&nbsp;|&nbsp;&nbsp;
  <span id="busuanzi_container_site_pv">PV:<span id="busuanzi_value_site_pv"></span></span>&nbsp;&nbsp;|&nbsp;&nbsp;
T
TRHX 已提交
1173
  <span class="post-count">Word Count:47.9k</span>&nbsp;&nbsp;|&nbsp;&nbsp;
T
TRHX 已提交
1174 1175 1176
  <i class="fab fa-creative-commons"></i> <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" title="本站点采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可" target="_blank">BY-NC-SA 4.0</a>&nbsp;&nbsp;|&nbsp;&nbsp;
  -->
  <a href="https://itrhx.com/sitemap.xml" target="_blank">站点地图</a>&nbsp;&nbsp;|&nbsp;&nbsp;
T
TRHX 已提交
1177 1178
  <script type="text/javascript" src="https://s23.cnzz.com/z_stat.php?id=1275909280&web_id=1275909280"></script><br><br>
  <div class="github-badge">
T
TRHX 已提交
1179
    <a style="color: #fff" rel="license" href="https://hexo.io/" target="_blank" title="由 Hexo 强力驱动">
T
TRHX 已提交
1180
    <span class="badge-subject">Powered</span><span class="badge-value bg-blue">Hexo</span></a>
T
TRHX 已提交
1181 1182
  </div>
  <div class="github-badge">
T
TRHX 已提交
1183 1184
    <a style="color: #fff" rel="license" href="https://github.com/" target="_blank" title="静态网页托管于 GitHub Pages">
    <span class="badge-subject">Hosted</span><span class="badge-value bg-brightgreen">GitHub</span></a>
T
TRHX 已提交
1185 1186
  </div>
  <div class="github-badge">
T
TRHX 已提交
1187 1188
    <a style="color: #fff" rel="license" href="https://www.aliyun.com/" target="_blank" title="阿里云提供域名相关服务">
    <span class="badge-subject">DNR</span><span class="badge-value bg-blueviolet">Aliyun</span></a>
T
TRHX 已提交
1189 1190
  </div>
  <div class="github-badge">
T
TRHX 已提交
1191 1192
    <a style="color: #fff" rel="license" href="https://www.jsdelivr.com/" target="_blank" title="jsDelivr提供CDN加速">
    <span class="badge-subject">CDN</span><span class="badge-value bg-orange">jsDelivr</span></a>
T
TRHX 已提交
1193 1194
  </div>
  <div class="github-badge">
T
TRHX 已提交
1195 1196
      <a style="color: #fff" rel="license" href="https://xaoxuu.com/wiki/material-x/" target="_blank" title="站点使用 Material X 主题,作者:xaoxuu">
    <span class="badge-subject">Theme</span><span class="badge-value bg-blue">Material X</span></a>
T
TRHX 已提交
1197 1198
  </div>
  <div class="github-badge">
T
TRHX 已提交
1199 1200
    <a style="color: #fff" rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank" title="本站点采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可">
    <span class="badge-subject"><i class="fa fa-copyright"></i></span><span class="badge-value bg-lightgrey">BY-NC-SA 4.0</span></a>
T
TRHX 已提交
1201 1202
  </div>
  <div class="github-badge">
T
TRHX 已提交
1203 1204
    <a style="color: #fff" rel="license" href="https://996.icu/" target="_blank" title="支持 996.ICU">
    <span class="badge-subject">Link</span><span class="badge-value bg-red">996.ICU</span></a>
T
TRHX 已提交
1205 1206 1207 1208 1209 1210 1211 1212
  </div>
  <div class="github-badge">
    <span class="badge-subject">UV</span><span class="badge-value bg-orange" id="busuanzi_value_site_uv"></span>
  </div>
  <div class="github-badge">
    <span class="badge-subject">PV</span><span class="badge-value bg-brightgreen" id="busuanzi_value_site_pv"></span>
  </div>
  <div class="github-badge">
T
TRHX 已提交
1213
    <span class="badge-subject">WordCount</span><span class="badge-value bg-blueviolet">47.9k</span>
T
TRHX 已提交
1214
  </div>
T
TRHX 已提交
1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279
</footer>


      <script>setLoadingBarProgress(60);</script>
    </div>
    <a class="s-top fas fa-arrow-up fa-fw" href='javascript:void(0)'></a>
  </div>
  <script src="https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js"></script>

  <script>
    var GOOGLE_CUSTOM_SEARCH_API_KEY = "";
    var GOOGLE_CUSTOM_SEARCH_ENGINE_ID = "";
    var ALGOLIA_API_KEY = "";
    var ALGOLIA_APP_ID = "";
    var ALGOLIA_INDEX_NAME = "";
    var AZURE_SERVICE_NAME = "";
    var AZURE_INDEX_NAME = "";
    var AZURE_QUERY_KEY = "";
    var BAIDU_API_ID = "";
    var SEARCH_SERVICE = "hexo" || "hexo";
    var ROOT = "/"||"/";
    if(!ROOT.endsWith('/'))ROOT += '/';
  </script>

<script src="//instant.page/1.2.2" type="module" integrity="sha384-2xV8M5griQmzyiY3CDqh1dn4z3llDVqZDqzjzcY+jCBCk/a5fXJmuZ/40JJAPeoU"></script>


  <script async src="https://cdn.jsdelivr.net/npm/scrollreveal@4.0.5/dist/scrollreveal.min.js"></script>
  <script type="text/javascript">
    $(function() {
      const $reveal = $('.reveal');
      if ($reveal.length === 0) return;
      const sr = ScrollReveal({ distance: 0 });
      sr.reveal('.reveal');
    });
  </script>


  <script src="https://cdn.jsdelivr.net/npm/node-waves@0.7.6/dist/waves.min.js"></script>
  <script type="text/javascript">
    $(function() {
      Waves.attach('.flat-btn', ['waves-button']);
      Waves.attach('.float-btn', ['waves-button', 'waves-float']);
      Waves.attach('.float-btn-light', ['waves-button', 'waves-float', 'waves-light']);
      Waves.attach('.flat-box', ['waves-block']);
      Waves.attach('.float-box', ['waves-block', 'waves-float']);
      Waves.attach('.waves-image');
      Waves.init();
    });
  </script>


  <script async src="https://cdn.jsdelivr.net/gh/xaoxuu/cdn-busuanzi@2.3/js/busuanzi.pure.mini.js"></script>










  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">
  <script src="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script>
T
TRHX 已提交
1280
  <script src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.min.js"></script>
T
TRHX 已提交
1281 1282 1283 1284 1285 1286 1287 1288
  <script type="text/javascript">
    var gitalk = new Gitalk({
      clientID: "d19a84b9d9a2ddb2c6b9",
      clientSecret: "cec9feae5129a6106edc68ce06d167be8eb06021",
      repo: "trhx.github.io",
      owner: "trhx",
      admin: "trhx",
      
T
TRHX 已提交
1289
        id: md5(location.pathname),      // Ensure uniqueness and length less than 50
T
TRHX 已提交
1290 1291 1292 1293 1294 1295 1296 1297 1298 1299
      
      distractionFreeMode: false  // Facebook-like distraction free mode
    });
    gitalk.render('gitalk-container');
  </script>





T
TRHX 已提交
1300
  <script src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@2.0.8/js/app.js"></script>
T
TRHX 已提交
1301 1302


T
TRHX 已提交
1303
  <script src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@2.0.8/js/search.js"></script>
T
TRHX 已提交
1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417




<!-- 复制 -->
<script src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js"></script>
<script>
  let COPY_SUCCESS = "复制成功";
  let COPY_FAILURE = "复制失败";
  /*页面载入完成后,创建复制按钮*/
  !function (e, t, a) {
    /* code */
    var initCopyCode = function(){
      var copyHtml = '';
      copyHtml += '<button class="btn-copy" data-clipboard-snippet="">';
      copyHtml += '  <i class="fa fa-copy"></i><span>复制</span>';
      copyHtml += '</button>';
      $(".highlight .code pre").before(copyHtml);
      var clipboard = new ClipboardJS('.btn-copy', {
        target: function(trigger) {
          return trigger.nextElementSibling;
        }
      });

      clipboard.on('success', function(e) {
        //您可以加入成功提示
        console.info('Action:', e.action);
        console.info('Text:', e.text);
        console.info('Trigger:', e.trigger);
        success_prompt(COPY_SUCCESS);
        e.clearSelection();
      });
      clipboard.on('error', function(e) {
        //您可以加入失败提示
        console.error('Action:', e.action);
        console.error('Trigger:', e.trigger);
        fail_prompt(COPY_FAILURE);
      });
    }
    initCopyCode();

  }(window, document);

  /**
   * 弹出式提示框,默认1.5秒自动消失
   * @param message 提示信息
   * @param style 提示样式,有alert-success、alert-danger、alert-warning、alert-info
   * @param time 消失时间
   */
  var prompt = function (message, style, time)
  {
      style = (style === undefined) ? 'alert-success' : style;
      time = (time === undefined) ? 1500 : time*1000;
      $('<div>')
          .appendTo('body')
          .addClass('alert ' + style)
          .html(message)
          .show()
          .delay(time)
          .fadeOut();
  };

  // 成功提示
  var success_prompt = function(message, time)
  {
      prompt(message, 'alert-success', time);
  };

  // 失败提示
  var fail_prompt = function(message, time)
  {
      prompt(message, 'alert-danger', time);
  };

  // 提醒
  var warning_prompt = function(message, time)
  {
      prompt(message, 'alert-warning', time);
  };

  // 信息提示
  var info_prompt = function(message, time)
  {
      prompt(message, 'alert-info', time);
  };

</script>


<!-- fancybox -->
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
<script>
  let LAZY_LOAD_IMAGE = "";
  $(".article-entry").find("fancybox").find("img").each(function () {
      var element = document.createElement("a");
      $(element).attr("data-fancybox", "gallery");
      $(element).attr("href", $(this).attr("src"));
      /* 图片采用懒加载处理时,
       * 一般图片标签内会有个属性名来存放图片的真实地址,比如 data-original,
       * 那么此处将原本的属性名src替换为对应属性名data-original,
       * 修改如下
       */
       if (LAZY_LOAD_IMAGE) {
         $(element).attr("href", $(this).attr("data-original"));
       }
      $(this).wrap(element);
  });
</script>





  <script>setLoadingBarProgress(100);</script>
T
TRHX 已提交
1418
  <!-- Google AdSense 
T
TRHX 已提交
1419 1420 1421 1422 1423
  <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
  <script>
    (adsbygoogle = window.adsbygoogle || []).push({
      google_ad_client: "ca-pub-1913211097936916",
      enable_page_level_ads: true
T
TRHX 已提交
1424
    });-->
T
TRHX 已提交
1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444
  </script>
  <!-- 十年之约 
  <a target="_blank" href="http://join.foreverblog.cn" style="position:fixed;z-index:999;right:-5px;bottom: 25px;display: inline-block;width: 35px;border-radius: 5px;color:white;font-size:14px;line-height:17px;background: #1BC3FB;box-shadow: 0 0 5px #666;word-wrap: break-word;padding: 10px 6px;border: 2px solid white;">十年之约</a>-->
  <!-- 单击显示文字 -->
  <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@2.0.2/js/ClickShowText.js"></script>
  <!-- 浏览器搞笑标题 -->
  <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@2.0.2/js/FunnyTitle.js"></script>
  <!-- 样式一(鼠标点击更换样式) 
  <script src="https://g.joyinshare.com/hc/ribbon.min.js" type="text/javascript"></script>-->
  <!-- 样式二(飘动的彩带) 
  <script src="https://g.joyinshare.com/hc/piao.js" type="text/javascript"></script>-->
  <!-- 数字雨 -->
  <canvas id="canvas" width="1440" height="900" ></canvas>
  <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@2.0.2/js/DigitalRain.js"></script>
  <!--动态线条背景
  <script type="text/javascript" color="27,195,251" opacity='0.7' zIndex="-5" count="200" src="//cdn.bootcss.com/canvas-nest.js/1.0.0/canvas-nest.min.js"></script>-->
  <!-- 速度优化脚本 -->
  <script src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@2.0.2/js/instantclick-1.2.2.js" type="module"></script>
</body>
</html>