2017-02-10 79 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中执行 –