gitã¯ã©ããã¦ãç¬èªãããã³ã«+sshã使ã£ã¦æ¬²ããã®ã ããããHTTPèªè¨¼ãããå æ¸ããããlibcurlã§ããã©ã«ãã§ã§ãããã¨ããã§ããªãã
èªè¨¼æ¹å¼ã®æå®ãã§ããªã
ã¾ããèªè¨¼æ¹å¼ãæå®ãããã¨ãä¸åã§ããªããBASICèªè¨¼ãªãä¸å¿ä½¿ãããããããlibcurlãç¡æå®ã§ãã£ã¦ããã¦ãåã ãã
ã¦ã¼ã¶åããã¹ã¯ã¼ããconfigã«ä¿åã§ããªã
ã¦ã¼ã¶åããã¹ã¯ã¼ãã¯configãã¡ã¤ã«ã«ä¿åã§ãã¦ç¶ãã¹ãæ
å ±ããããã§ããªãã®ã§ã¯å¯¾å¿ããæ°ããªãã¨è¨ããããå¾ãªãã
ä¸å¿æå®ããæ¹æ³ã¯ããããã¹ãã¼ãã§ã¯ãªãã
netrcãã¡ã¤ã«ã使ã
$HOME/.netrcã«ä»¥ä¸ã®ããã«æ¸ãã¦ããã
machine www.example.com login username password password
ãã¡ããããã ã¨BASICèªè¨¼ãã対å¿ã§ããªããã1ã¤ã®ãã¹ãã«å¯¾ãã¦1ã¤ã®ã¦ã¼ã¶ã§ããèªè¨¼ã§ããªãããã¹ã¯ã¼ããå¹³æã§æ¸ãã¦ãããªãã¦ã¯ãªããªããæãããã
URLã«å«ãã
curlã¯ã
http://<username>:<password>@hostname/path/to/rep
ã®å½¢å¼ã使ç¨ã§ãããå
ã
ftpãããã³ã«ã§ã®æå®æ¹æ³ã ããcurlã§ã¯httpã§ãèªèãã¦ãããã
ãã ãããããªæãããæ¹æ³ã¯ã§ãããã¨ãªã使ããããªãã¨ããã
$ git clone http://<username>:<password>@hostname/path/to/rep
ãªã©ã¨ããããã®ãªããã³ãã³ããã¹ããªã¼ã.git/configã«ãã¹ã¯ã¼ããæ®ããpushãªã©ããããã³ã«URLã表示ããã¦ãã¾ãã
ã©ã¡ãã®æ¹æ³ããã¹ã¯ã¼ãã®å¹³æããã¡ã¤ã«ã«æ®ã£ããç»é¢ã«æ ã£ããããã®ã§ã§ããã°ä½¿ããããªãããä»ã«æ¹æ³ããªã*1ããããBASICèªè¨¼ãªã®ã§ãhttpsã®ä½¿ç¨ã¯å¿
é ã ããã
sshã®æ¹ãssh-agentãéµãªãç§å¯éµã使ã£ãããã¦èª¤éåãã¦ãæãã ã£ãæ°ãããã®ã§*2ãgitããã«ã¯æ©ãã¨ãããã¹ã¯ã¼ããæå·åãã¦configã«å«ãããããã®ãã¨ã¯ãã£ã¦ããã ãããã