2017-02-10 77 views
-1

我如何克隆與名myproject回購,服務器目錄被命名爲使用智能https584ffceed.git一個唯一的代碼,以及我如何設置要求輸入用戶名和密碼,給權利權限推或拉?克隆一個Git倉庫與另一名

+2

'git的clone'直接放置在參數 - > HTTPS ://git-scm.com/docs/git-clone – miqdadamirali

回答

5

克隆到myproject只是做git clone .../584ffceed.git myproject

關於你的其他問題,你不清楚你在問什麼。請重新說明這個問題以說清楚。

+0

我如何讓git爲我的http://site.tk請求用戶名和密碼並進行身份驗證,然後讓它克隆或推送 –

+0

我可以使用php ? –

+0

你說你使用智能HTTP像這裏desribed:https://git-scm.com/book/be/v2/Git-on-the-Server-Smart-HTTP?本頁面還介紹如何添加身份驗證。 – Vampire

0

克隆以這種方式回購...

git clone clone_url.git project_name 
1

人混帳克隆

git clone [--template=<template_directory>] 
      [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror] 
      [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>] 
      [--dissociate] [--separate-git-dir <git dir>] 
      [--depth <depth>] [--[no-]single-branch] 
      [--recursive | --recurse-submodules] [--[no-]shallow-submodules] 
      [--jobs <n>] [--] <repository> [<directory>] 

<directory> 
      The name of a new directory to clone into. 
      The "humanish" part of the source repository is used if no directory is explicitly given (repo for /path/to/repo.git and foo for 
      host.xz:foo/.git). 
      Cloning into an existing directory is only allowed if the directory is empty. 

這是庫URI後

+0

我如何讓git爲我的http://site.tk請求用戶名和密碼並進行身份驗證,然後讓它克隆或推送,即只允許特定用戶推送到特定的回購站 –

+0

就像github –

+0

並且在nginx中執行 –