(1)鍵入
install git
顯示如下
Error: Insufficient privileges to write to MacPorts install prefix.
說明你的 MacPorts shell 模式并未以超級用戶權(quán)限執(zhí)行,因此無法安裝軟件包。
(MacPorts shell 是一個交互式命令行環(huán)境,它允許你直接執(zhí)行 MacPorts 命令,無需在每條命令前添加 port。
當(dāng)你在命令行中只輸入 port 并按下回車鍵時,你就進入了 MacPorts shell。在這個環(huán)境中,你可以直接輸入 MacPorts 命令,例如 install git,而無需添加 port,即不需要寫成 port install git。
這種情況說明你在 MacPorts shell 中遇到了權(quán)限問題,這可能意味著這個 shell 沒有以超級用戶權(quán)限(sudo)運行。)
在這種情況下,你可以選擇退出 MacPorts shell 模式并在常規(guī)的命令行中執(zhí)行安裝命令。在 MacPorts shell 中輸入 quit 來退出,然后在常規(guī)的命令行中輸入 sudo port install git 來安裝 git。
(2)鍵入
sudo port install git
顯示如下
Password:
—> Computing dependencies for git
表示 MacPorts 正在計算安裝 git 所需的依賴包。MacPorts 將會自動處理這些依賴關(guān)系,安裝所有必要的軟件包。
4. MacPorts會列出的所有為了安裝git而需要的依賴庫。這個列表看起來可能有些長,但實際上這是正常的。許多包有著相互的依賴關(guān)系,為了讓git工作,需要確保這些依賴庫都被正確地安裝。最后顯示如下
Continue? [Y/n]:
系統(tǒng)現(xiàn)在問你是否要繼續(xù)進行。如果你同意安裝這些依賴庫,你可以輸入 Y 然后按回車。
5. 這是你安裝git和其它依賴庫后,MacPorts提供的一些重要信息和提示。(可以忽略)
—> Some of the ports you installed have notes:
db48 has the following notes:
The Java and Tcl bindings are now provided by the db48-java and
db48-tcl subports.
git has the following notes:
Configuration to enable the osxkeychain credential helper has been added to
the system-wide gitconfig at /opt/local/etc/gitconfig. If you do not wish to
use
this credential helper, you can override this setting in your own personal
git config file ($HOME/.gitconfig) with e.g.
[credential]
helper = some_other_credential_helper
For more information, run
git help credentials
libidn has the following notes:
GNU libidn2 is the successor of GNU libidn. It comes with IDNA 2008 and TR46
implementations and also provides a compatibility layer for GNU libidn.
libpsl has the following notes:
libpsl API documentation is provided by the port ‘libpsl-docs’.
rsync has the following notes:
To use the rsyncd server you must copy /opt/local/etc/rsyncd.conf.example to
rsyncd.conf and add your modules there. See ‘man rsyncd.conf’ for more
information.
A startup item has been generated that will aid in starting rsync with
launchd. It is disabled by default. Execute the following command to start
it, and to cause it to launch at startup:
sudo port load rsync
- 關(guān)于
db48
:Java和Tcl的綁定現(xiàn)在由db48-java
和db48-tcl
子端口提供。 - 關(guān)于
git
:已將啟用osxkeychain憑據(jù)幫助程序的配置添加到位于/opt/local/etc/gitconfig
的系統(tǒng)范圍內(nèi)的gitconfig中。如果你不想使用此憑據(jù)幫助程序,你可以在自己的個人git配置文件($HOME/.gitconfig
)中覆蓋此設(shè)置,例如:
[credential]
helper = some_other_credential_helper
如果你需要更多信息,可以運行git help credentials
命令。
- 關(guān)于
libidn
:GNU libidn2是GNU libidn的后繼。它帶有IDNA 2008和TR46實現(xiàn),并提供了GNU libidn的兼容層。 - 關(guān)于
libpsl
:libpsl API文檔由libpsl-docs
端口提供。 - 關(guān)于
rsync
:如果你想使用rsyncd服務(wù)器,你必須將/opt/local/etc/rsyncd.conf.example
復(fù)制到rsyncd.conf
并在那里添加你的模塊。關(guān)于更多信息,可以參閱man rsyncd.conf
。
一個啟動項已生成,將有助于使用launchd啟動rsync。默認(rèn)情況下,它是禁用的。執(zhí)行以下命令以啟動它,并使它在啟動時加載:
sudo port load rsync
6. 現(xiàn)在你已經(jīng)在你的macOS上通過MacPorts安裝了git,所以你應(yīng)該能夠在命令行中使用它。你可以通過打開終端并鍵入git --version來檢查它是否已正確安裝。如果你看到git的版本號,那么git應(yīng)該已經(jīng)可以使用了。
7. 克隆遠程倉庫:這是將遠程倉庫復(fù)制到本地的操作。命令格式為:git clone [url]。例如:
git clone https://gitee.com/your_username/your_repository.git
“https://gitee.com/username/repo.git”(其中,“username” 是你的 Gitee 用戶名,“repo” 是你的倉庫名)
如果你想克隆 GitHub 上的一個項目,可以使用
git clone https://github.com/user/repo.git。
現(xiàn)在你的Gitee倉庫應(yīng)該已經(jīng)被克隆到你的本地目錄了。你可以通過cd命令進入到那個目錄,并使用git status命令查看倉庫狀態(tài)。
接下來會讓你輸入賬戶名和密碼
Username for ‘https://gitee.com’:
自我介紹一下,小編13年上海交大畢業(yè),曾經(jīng)在小公司待過,也去過華為、OPPO等大廠,18年進入阿里一直到現(xiàn)在。
深知大多數(shù)大數(shù)據(jù)工程師,想要提升技能,往往是自己摸索成長或者是報班學(xué)習(xí),但對于培訓(xùn)機構(gòu)動則幾千的學(xué)費,著實壓力不小。自己不成體系的自學(xué)效果低效又漫長,而且極易碰到天花板技術(shù)停滯不前!
因此收集整理了一份《2024年大數(shù)據(jù)全套學(xué)習(xí)資料》,初衷也很簡單,就是希望能夠幫助到想自學(xué)提升又不知道該從何學(xué)起的朋友。
既有適合小白學(xué)習(xí)的零基礎(chǔ)資料,也有適合3年以上經(jīng)驗的小伙伴深入學(xué)習(xí)提升的進階課程,基本涵蓋了95%以上大數(shù)據(jù)開發(fā)知識點,真正體系化!
由于文件比較大,這里只是將部分目錄大綱截圖出來,每個節(jié)點里面都包含大廠面經(jīng)、學(xué)習(xí)筆記、源碼講義、實戰(zhàn)項目、講解視頻,并且后續(xù)會持續(xù)更新文章來源:http://www.zghlxwxcb.cn/news/detail-851263.html
如果你覺得這些內(nèi)容對你有幫助,可以添加VX:vip204888 (備注大數(shù)據(jù)獲取)
正體系化!**
由于文件比較大,這里只是將部分目錄大綱截圖出來,每個節(jié)點里面都包含大廠面經(jīng)、學(xué)習(xí)筆記、源碼講義、實戰(zhàn)項目、講解視頻,并且后續(xù)會持續(xù)更新
如果你覺得這些內(nèi)容對你有幫助,可以添加VX:vip204888 (備注大數(shù)據(jù)獲?。?/strong>
[外鏈圖片轉(zhuǎn)存中…(img-xUzbEG75-1712518180864)]文章來源地址http://www.zghlxwxcb.cn/news/detail-851263.html
到了這里,關(guān)于git在macOS環(huán)境下的安裝與配置(小白版)_apple git 設(shè)置(1)的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!