簡體   English   中英

如何結帳git子模塊以進行銷售

[英]How do i checkout a git submodules for Point-to-sale

Git子模塊

使用git submodule add git@github.com:Square/SquarePointOfSaleSDK-iOS.git檢出子git submodule add git@github.com:Square/SquarePointOfSaleSDK-iOS.git ,將SquarePointOfSaleSDK.xcodeproj拖到您的項目中,然后將SquarePointOfSaleSDK添加為構建依賴項。

我目前處於將SDK添加到我的Xcode項目的步驟,但是當我在終端中鍵入該命令時,出現此錯誤:

Permission denied (publickey).
fatal: Could not read from remote repository.

請確保您具有正確的訪問權限,並且存儲庫存在。

我究竟做錯了什么? 我對移動開發還很陌生。

當您沒有ssh密鑰的正確特權或ssh密鑰過舊時,這是一個非常經典的問題。 它不會讓您將存儲庫添加為子模塊或克隆存儲庫。

選擇您選擇的任何編輯器,然后執行以下操作,

方法1,替換舊的SSH密鑰

nano ~/.ssh/your_key.pub之后,復制ssh密鑰並刪除未使用的舊ssh密鑰。

添加新的ssh密鑰,然后git submodule update --init --recursive


方法2,為SSH密鑰提供特權

在這種情況下,將所有使用該存儲庫的用戶添加到同一組中。 他們每個人都授予讀寫權限。

為了授予訪問權限,您需要使用CHMOD實用程序。

chmod命令列表。

chmod -R 777 /var/www (setting the permission recursively)
chmod a-w file (removes all writing permissions)
chmod o+x file (sets execute permissions for other (public permissions))
chmod u=rx file        (Give the owner rx permissions, not w)
chmod go-rwx file      (Deny rwx permission for group, others)
chmod g+w file         (Give write permission to the group)
chmod a+x file1 file2  (Give execute permission to everybody)
chmod g+rx,o+x file    (OK to combine like this with a comma)

u = user that owns the file
g = group that owns the file
o = other (everyone else)
a = all (everybody)

r = read aces to the file
w = write access
x = execute (run) access 

設置正確的權限后,您可以執行git submodule update --init --recursive

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM