<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # hexo+Github免費搭建個人博客(一):git連接GitHub [toc] ## 準備工作 1. 注冊一個GitHub賬號[GitHub官網](https://github.com/) 2. nodejs安裝包[nodejs官網下載](http://nodejs.cn/download/) 3. git下載[git官網下載](https://git-scm.com/downloads) 4. notepad++[notepad++官網下載](https://notepad-plus-plus.org/downloads/) ## 工具用途 1. Github賬號:是存儲自己網頁的儲存庫(類似于一個服務器) 2. nodejs:是用于hexo環境搭建的,主要是用其**npm**命令來下載hexo所需要的資源包 3. git:用于連接GitHub,將本地的hexo生成的靜態網頁,直接上傳到GitHub上完成部署 ## git連接GitHub ### 安裝git 1.雙擊軟件包,打開下面頁面,點擊**Next**按鈕,進入下一步 ![](https://imgkr.cn-bj.ufileos.com/ad442c37-55f0-409f-82d0-9f91636e5fe0.png) 2.選擇安裝路徑,點擊**Next**按鈕,進入下一步 ![](https://imgkr.cn-bj.ufileos.com/a631ce89-1605-490d-aa61-ec0b460af1d3.png) 3.不會選擇,默認即可,圖片下面有注釋,點擊**Next**按鈕,進入下一步 ![](https://imgkr.cn-bj.ufileos.com/bc211a89-3255-4e7e-b4e2-de24d5213e71.png) > **Additional icons**: 附加圖標 > > **On the Desktop**: 在桌面上 > > **Windows Explorer integration Windows**:資源管理器集成鼠標右鍵菜單 >> **Git Bash Here** >> >> **Git GUI Here** > > **Git LFS (Large File Support)**: 大文件支持 > > **Associate .git* configuration files with the default text editor**: 將 .git 配置文件與默認文本編輯器相關聯 > > **Associate .sh files to be run with Bash**: 將.sh文件關聯到Bash運行 > > **Use a TrueType font in all console windows**: 在所有控制臺窗口中使用TrueType字體 > > **Check daily for Git for Windows updates** 每天檢查Git是否有Windows更新 4.不用動,點擊**Next**按鈕,進入下一步 ![](https://imgkr.cn-bj.ufileos.com/4f1f688b-7ed5-42a6-b29b-4a676d7d25bd.png) 5.默認即可,點擊**Next**按鈕,進入下一步 ![](https://imgkr.cn-bj.ufileos.com/af866440-036f-4125-ac77-5cc978e3d494.png) >**Use the Nano editor by default**: 默認使用 Nano 編輯器 > >**Use Vim (The ubiquitous text editor) as Git's default editor**: 使用 Vim 作為 Git 的默認編輯器 > >**Use Notepad++ as Git's default editor**: 使用 Notepad++ 作為 Git 的默認編輯器 > >**Use Visual Studio Code as Git's default editor**: 使用 Visual Studio Code 作為Git 的默認編輯器 > >**Use Visual Studio Code Insiders as Git's default editor**: 使用Visual Studio Code Insiders 作為 Git 的默認編輯器 6.配置path變量,選擇**Git from the command line and also from 3rd-party software**,點擊**Next**按鈕,進入下一步 ![](https://imgkr.cn-bj.ufileos.com/8ef71ad3-af5f-4853-8101-d905818bf060.png) >**Use Git from Git Bash only** >>This is the safest choice as your PATH will not be modified at all.You will only be able to use the Git command line tools form Git Bash. >> >>這是最安全的選擇,因為您的PATH根本不會被修改。您只能使用 Git Bash 的 Git 命令行工具。 > >**Git from the command line and also from 3rd-party software** >>(Recommended)This option adds only some minimal Git wrappers to your PATH to avoid cluttering your environment with optional Unix tools. You will be able to use Git from Git Bash,the Command Prompt and the Windows PowerShell as well as any third-party software looking for Git in PATH. >> >>(推薦)此選項僅將一些最小的Git包裝器添加到PATH中,以避免使用可選的Unix工具使環境混亂。 >> >>您將能夠使用Git Bash中的Git,命令提示符和Windows PowerShell以及在PATH中尋找Git的任何第三方軟件。 > >**Use Git and optional Unix tools from the Command Prompt** > >從Windows命令提示符使用Git和可選的Unix工具 >>Both Git and the optional Unix tools will be added to you PATH >> >>Git和可選的Unix工具都將添加到您計算機的 PATH 中 >> >>Warning:This will override Windows tools like "find and sort".Only use this option if you understand the implications. >> >>警告:這將覆蓋Windows工具,如 “ find 和 sort ”。只有在了解其含義后才使用此選項。 7.選擇**Use the OpenSSL library**,點擊**Next**按鈕,進入下一步 ![](https://imgkr.cn-bj.ufileos.com/8ded1ac3-588f-4193-a26b-099e4682cbe6.png) >**Use the OpenSSL library** > >使用 OpenSSL 庫 >>Server certificates will be validated using the ca-bundle.crt file. >> >>服務器證書將使用ca-bundle.crt文件進行驗證。 > >**Use the native Windows Secure Channel library** > >使用本地 Windows 安全通道庫 >>Server certificates will be validated using Windows Certificate Stores.This option also allows you to use your company's internal Root CA certificates distributed e.g. via Active Directory Domain Services. >> >>服務器證書將使用Windows證書存儲驗證。此選項還允許您使用公司的內部根CA證書,例如, 通過Active Directory Domain Services 。 8.選擇**Checkout Windows-style,commit Unix-style line endings**,點擊**Next**按鈕,進入下一步 ![](https://imgkr.cn-bj.ufileos.com/f7d6447d-3695-4093-ac8b-381f41819a16.png) >**Checkout Windows-style,commit Unix-style line endings** >>Git will convert LF to CRLF when checking out text files.When committing text files,CRLF will be converted to LF .For cross-pltform projects,this is the recommended setting on Windows ("core.autocrlf" is set to "true") >> >>在檢出文本文件時,Git會將LF轉換為CRLF。當提交文本文件時,CRLF將轉換為LF。 對于跨平臺項目,這是Windows上推薦的設置(“core.autocrlf”設置為“true”) > >**Checkout as-is , commit Unix-style line endings** >>Git will not perform any conversion when checking out text files. When committing text files, CRLF will be converted to LF. For cross-platform projects,this is the recommended setting on Unix ("core.autocrlf" is set to "input") >> >>在檢出文本文件時,Git不會執行任何轉換。 提交文本文件時,CRLF將轉換為LF。 對于跨平臺項目,這是Unix上的推薦設置 (“core.autocrlf”設置為“input”) > >**Checkout as-is,commit as-is** >>Git will not perform any conversions when checking out or committing text files.Choosing this option is not recommended for cross-platform projects ("core.autocrlf"is set to "false") >> >>在檢出或提交文本文件時,Git不會執行任何轉換。對于跨平臺項目,不推薦使用此選項(“core.autocrlf”設置為“false”) 9.選擇**Use MinTTY (the default terminal of MSYS2)**,點擊**Next**按鈕,進入下一步 ![](https://imgkr.cn-bj.ufileos.com/b21ae4a9-188e-4f70-8782-ba2b8ea811cf.png) >**Use MinTTY (the default terminal of MSYS2)** >>Git Bash will use MinTTY as terminal emulator,which sports a resizable window,non-rectangular selections and a Unicode font. Windows console programs (such as interactive Python) must be launched via 'winpty' to work in MinTTY. >> >>Git Bash將使用MinTTY作為終端模擬器,該模擬器具有可調整大小的窗口,非矩形選區和Unicode字體。 Windows控制臺程序(如交互式Python)必須通過'winpty'啟動才能在MinTTY中運行。 > >**Use Windows' default console window** >>Git will use the default console window of Windows ("cmd.exe"),which works well with Win32 console programs such as interactive Python or node.js , but has a very limited default scroll-back,needs to be configured to use aUnicode font in order to display non-ASCII characters correctly,and prior to Windows 10 its windows was not freely resizable and it only allowed rectangular text selections. >> >>Git將使用Windows的默認控制臺窗口(“cmd.exe”),該窗口可以與Win32控制臺程序(如交互式Python或node.js)一起使用,但默認的回滾非常有限,需要配置為使用unicode 字體以正確顯示非ASCII字符,并且在Windows 10之前,其窗口不能自由調整大小,并且只允許矩形文本選擇。 10.選擇默認選項,點擊**Install**按鈕,開始安裝 ![](https://imgkr.cn-bj.ufileos.com/66b85c82-f540-444a-bf9d-87656d10434f.png) >**Enable file system caching**<br> >啟用文件系統緩存 >>File system data will be read in bulk and cached in memory for certain operations ("core.fscache" is set to "true"). This provides a significant performance boost.<br> >>文件系統數據將被批量讀取并緩存在內存中用于某些操作(“core.fscache”設置為“true”)。 這提供了顯著的性能提升。 > >**Enable Git Credential Manager**<br> >啟用Git憑證管理器 >>The Git Credential Manager for Windows provides secure Git credential storage for Windows,most notably multi-factor authentication support for Visual Studio Team Services and GitHub. (requires .NET framework v4.5.1 or or later).<br> >>Windows的Git憑證管理器為Windows提供安全的Git憑證存儲,最顯著的是對Visual Studio Team Services和GitHub的多因素身份驗證支持。 (需要.NET Framework v4.5.1或更高版本)。 > >**Enable symbolic links**<br> >啟用符號鏈接 >>Enable symbolic links (requires the SeCreateSymbolicLink permission).Please note that existing repositories are unaffected by this setting.<br> >>啟用符號鏈接(需要SeCreateSymbolicLink權限)。請注意,現有存儲庫不受此設置的影響。 11.安裝進行中,如下圖所示 ![](https://imgkr.cn-bj.ufileos.com/65c4e2b2-9e5a-4d81-af25-4de2ebe02cc2.png) 12.安裝成功![](https://res.smzdm.com/images/emotions/64.png) ![](https://imgkr.cn-bj.ufileos.com/a1e01445-e106-4219-9eb6-991cc5d0fe3b.png) ### 創建ssh key 1. 設置自己的username和email(github和gitee會記錄的) - 在Windows桌面**右擊**打開**Git Bash Here**,一行命令回車一次 ![](https://imgkr.cn-bj.ufileos.com/7ee100b1-8c30-4802-b5a1-d535581bfd97.png) ``` powershell git config --global user.name "itxh" git config --global user.email "892457803@qq.com" ``` ![](https://imgkr.cn-bj.ufileos.com/f4fbeedf-0b27-4d3e-abeb-a17198c34a8a.png) 2. 創建ssh key(換成自己的) ``` powershell ssh-keygen -t rsa -C "892457803@qq.com" ``` 有要輸入的地方,回車就行 成功后會在windows的**用戶文件夾**下創建一個.ssh文件夾,里面有一個**id_rsa.pub**文件,復制里面的內容 用一下命令來查看**id_rsa.pub**里面的內容 ![](https://imgkr.cn-bj.ufileos.com/29bc4388-c8d0-4cad-bfee-b0ee3d70b787.png) ``` powershell cat .ssh/id_rsa.pub ``` ![](https://imgkr.cn-bj.ufileos.com/1fee710c-732b-4e89-bc2a-7ae1000d6b93.png) 3. 給GitHub添加公鑰 - 登錄GitHub,點擊**頭像**,點擊**Settings** ![](https://imgkr.cn-bj.ufileos.com/f7b32a5d-c582-46bb-9b4e-7f891ee48912.png) - 點擊**SSH and GPG keys**,再點擊*New SSH key**,標題隨便起,**key**添加**id_rsa.pub**里面的內容,點擊**Add SSH key**按鈕,即可添加成功。 ![](https://imgkr.cn-bj.ufileos.com/4e80bfde-7c61-4d69-976d-c427d9038e75.png) ### 檢驗是否連接成功 #### Github檢驗,出現你的姓名,表示連接成功 - 出現輸入的地方,輸入**yes**即可 ```powershell ssh -T git@github.com ``` ![](https://imgkr.cn-bj.ufileos.com/3b8311d1-fc15-4443-8979-1cdf9d1cf881.png) ## 本人搭建環境(親測,沒問題) - win7 - win10 - mac
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看