wcm2020 12

  • Home
    • Site Map
    • reveal
    • blog
  • HOME
  • 每周上課內容
  • 上課內容整理
    • W10
      • Python程式
      • CSV
    • W12
      • 建立虛擬主機
    • W14
      • MBR與GPT
      • BIOS與UEFI
    • W15
      • 利用Pypdf2來切割PDF檔
    • W16
      • 何謂wsgi
    • W17
      • PDF網際分割與合併程式
      • 何謂 API
      • 何謂 URI
      • 何謂 URL 、 URN
  • 錯誤修正
    • 命令列無法使用pip下載程式
  • 操作步驟教學
    • 如何建網頁
    • 如何使用SSH維護倉儲
    • 如何安裝虛擬主機
    • 如何使用leo編輯Palican
    • 如何在虛擬主機上clone倉儲
如何建網頁 << Previous Next >> 如何安裝虛擬主機

如何使用SSH維護倉儲

新增SSH的Key

1.利用編輯器進入shell的命令環境

2.並輸入指令

ssh-keygen -t rsa -b 4096 -C "學號"

/y/tmp/key/id_rsa 在此目錄下 id_rsa 與 id_rsa.pub 等 private key 與 public key

3.下載 putty 工具組,並利用 puttygen.exe 將 id_rsa 轉為 Putty 可以解讀的 .ppk 格式

按下 Save private key 儲存

4.將 public key 利用 scite 開啟 ,在工具列中Options-Wrap就可見完整的檔案內容

5.將其內容複製後,開啟 github settings 中的 SSH and GPD keys

選擇 New SSH key

將其複製內容放入key的空格

6.修改啟動的 start.bat 加入下列設定:

set GIT_HOME=%Disk%:\portablegit\bin\
set GIT_SSH=%Disk%:\putty\plink.exe

設定Putty:

1.將home 下的 .ssh 目錄中的 config 設定檔案為:

 

2.將倉儲中 .git 目錄下的 config 檔案中的連線協定, 由 https 改為採 ssh 連線: 

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
[submodule]
    active = .
[remote "origin"]
    #url = https://github.com/mdecourse/wcmj2020.git
    url = git@github.com:mdecourse/wcmj2020.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
[submodule "cmsimde"]
    url = https://github.com/mdecourse/cmsimde.git

3.開啟 Putty.exe

4.Load github.com

5.進入 Connection-SSH-Auth 選擇之前所創好的Key

6.回到 Session 按save

7.按下open就可無需輸入帳號密碼進行 git push


如何建網頁 << Previous Next >> 如何安裝虛擬主機

Copyright © All rights reserved | This template is made with by Colorlib