Editing Git clone

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{lowercase}}
+
{{Draft}}
<code>[[git]] clone</code>
 
* Doc: https://git-scm.com/docs/git-clone
 
  
== Examples ==
+
git clone -vv https://github.com/zabbix/zabbix-docker.git
* <code>[[git clone]] https://github.com/zabbix/zabbix-docker.git</code>
+
Cloning into 'zabbix-docker'...
* <code>[[git clone]] https://github.com/zabbix/zabbix-docker.git name_folder_to_clone</code>
 
* <code>[[git clone -vv]] https://github.com/zabbix/zabbix-docker.git</code>
 
* <code>git clone ssh://[email protected].com:2224/username/test.git</code>
 
  
* <code>git clone [[--depth]]=1 https://gerrit.wikimedia.org/r/mediawiki/core.git mediawiki</code>
+
[[GIT_TRACE]]=1 [[GIT_CURL_VERBOSE]]=1 git clone --verbose https://github.com/zabbix/zabbix-docker.git
* <code>[[GIT_TRACE]]=1 [[GIT_CURL_VERBOSE]]=1 [[git clone --verbose]] https://github.com/zabbix/zabbix-docker.git</code>
 
* <code>git clone -c http.[[sslVerify]]=false</code>
 
* <code>[[git clone --bare]]</code>
 
  
  
for repo in $([[curl -s --header]] "[[PRIVATE-TOKEN]]: your_private_token" https://<your-host>/api/v4/groups/<group_id> | jq -r ".projects[].ssh_url_to_repo"); do git clone $repo; done;
 
  
== Errors executing <code>[[git clone]]</code> ==
 
[[git clone]] ssh://[email protected]:2224/username/test-username.git
 
Cloning into 'test-username'...
 
The authenticity of host '[10.10.10.5]:2224 ([10.10.10.5]:2224)' can't be established.
 
ECDSA key fingerprint is SHA256:WMfMtq7QBOrI/388RFgiWv8FJwV36qFrOtjvXJ7RZY4.
 
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
 
Warning: Permanently added '[10.10.10.5]:2224' (ECDSA) to the list of known hosts.
 
[email protected]: '''[[Permission denied]]''' (publickey).
 
fatal: Could not read from remote repository.
 
 
[[Please make sure you have the correct access rights and the repository exists]].
 
 
Cloning into 'test'...
 
warning: You appear to have cloned an empty repository.
 
  
 
  error: git upload-pack: git-pack-objects died with error.
 
  error: git upload-pack: git-pack-objects died with error.
Line 36: Line 13:
 
  remote: aborting due to possible repository corruption on the remote side.
 
  remote: aborting due to possible repository corruption on the remote side.
 
  fatal: protocol error: bad pack header
 
  fatal: protocol error: bad pack header
+
  Solution: review memory usage on git server
  Solution: Review [[memory]] usage on git server
 
 
 
 
 
[[remote: Repository not found.]]
 
  
  
 +
== With errors ==
  
  [[GIT_TRACE]]=1 [[GIT_CURL_VERBOSE]]=1 git clone --verbose https://gitlab.youdomain.com/project1/app.git
+
  GIT_TRACE=1 GIT_CURL_VERBOSE=1 git clone --verbose https://gitlab.youdomain.com/project1/app.git
 
  15:31:11.872513 exec-cmd.c:139          trace: resolved executable path from Darwin stack:  
 
  15:31:11.872513 exec-cmd.c:139          trace: resolved executable path from Darwin stack:  
  [[/Library/Developer/CommandLineTools/]]usr/bin/git
+
  /Library/Developer/CommandLineTools/usr/bin/git
 
  15:31:11.873411 exec-cmd.c:236          trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/bin
 
  15:31:11.873411 exec-cmd.c:236          trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/bin
 
  15:31:11.873488 git.c:418              trace: built-in: git clone --verbose https://gitlab.youdomain.com/project1/app.git
 
  15:31:11.873488 git.c:418              trace: built-in: git clone --verbose https://gitlab.youdomain.com/project1/app.git
Line 57: Line 31:
 
  * Couldn't find host gitlab.youdomain.com in the .netrc file; using defaults
 
  * Couldn't find host gitlab.youdomain.com in the .netrc file; using defaults
 
  *  Trying 10.10.110.xx...
 
  *  Trying 10.10.110.xx...
  * [[TCP_NODELAY]] set
+
  * TCP_NODELAY set
 
  * Connected to gitlab.youdomain.com (10.10.xx.xx) port 443 (#0)
 
  * Connected to gitlab.youdomain.com (10.10.xx.xx) port 443 (#0)
 
  * ALPN, offering http/1.1
 
  * ALPN, offering http/1.1
Line 68: Line 42:
 
  * Closing connection 0
 
  * Closing connection 0
 
  fatal: unable to access 'https://gitlab.youdomain.com/project1/app.git/': '''SSL certificate problem: [[self signed certificate]]'''
 
  fatal: unable to access 'https://gitlab.youdomain.com/project1/app.git/': '''SSL certificate problem: [[self signed certificate]]'''
 
Use: git clone -c http.sslVerify=false
 
 
git clone
 
[[xcrun]]: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at:
 
/Library/Developer/CommandLineTools/usr/bin/xcrun
 
  
 
== Related terms ==
 
== Related terms ==
* {{git get}}
+
* <code>[[git fetch]]</code>, <code>[[git pull]]</code>
 
* [[Clone git public repositories]]
 
* [[Clone git public repositories]]
* <code>[[git config --global]]</code>
 
* <code>[[git add]]</code>
 
* <code>[[git checkout]]</code>
 
* [[Personal access token (PAT)]]
 
* <code>[[gh repo clone]]</code>
 
* Windows: <code>[[%HOMEDRIVE%%HOMEPATH%\.ssh\id_rsa.pub]]</code>
 
  
 
== See also ==
 
== See also ==
 
* {{git}}
 
* {{git}}
 +
  
 
[[Category:Git]]
 
[[Category:Git]]

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Templates used on this page:

Advertising: