gitlabÄܸüв»¿ÉÉÏ°¶ÍøÕ¾Ôõô°ì
½üÆÚÓв»ÉÙÓû§·´Ó¦£¬ËûÃÇʹÓÃgitlab¾ÙÐа汾¿ØÖÆʱ£¬»á·ºÆð¡°Äܸüе«²»¿ÉÉÏ°¶ÍøÕ¾¡±µÄÇéÐΡ£ÕâÒ»ÎÊÌâÒ»Ö±À§ÈÅ×Ų»ÉÙÓû§£¬ÄÇô¸ÃÔõÑù½â¾öÄØ£¿±¾ÎĽ«¶Ô´ËÒ»ÎÊÌâ×ö³öÏêϸµÄ½â´ð¡£
Ê×ÏÈ£¬ÎÒÃÇÐèÒªÏàʶһÏÂÕâÒ»ÎÊÌâÈ·ÇеÄÌåÏÖÐÎʽ¡£µ±Óû§ÔÚʹÓÃGitlabʱ£¬¿ÉÄܻῴµ½ÈçÏÂÌáÐÑ£º
remote: HTTP Basic: Access denied fatal: Authentication failed for ¡®http£º//git.example.com/¡'
µÇ¼ºó¸´ÖÆ
Ò²ÓпÉÄܻῴµ½ÈçÏÂÌáÐÑ£º
fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
µÇ¼ºó¸´ÖÆ
ÕâЩÌáÐѶ¼Òâζ×ÅÓû§²»¿ÉÀÖ³ÉÉÏ°¶µ½GitlabÉÏ£¬ÎÞ·¨»á¼ûËùÐèµÄ×ÊÔ´¡£
¸ÃÔõÑù½â¾öÕâÒ»ÎÊÌâÄØ£¿ÎÒÃÇ¿ÉÒÔ´ÓÒÔϼ¸¸ö·½ÃæÈëÊÖ£º
¼ì²éÓû§ÃûºÍÃÜÂëµÄ׼ȷÐÔ
ÔÚ»á¼ûGitlabʱ£¬ÎÒÃÇÒªÊäÈë׼ȷµÄÓû§ÃûºÍÃÜÂë²Å»ª¾ÙÐÐÏÂÒ»²½²Ù×÷¡£Òò´Ë£¬ÈôÊÇÎÒÃDz»¿ÉÉÏ°¶£¬¾ÍÐèÒª¼ì²éÒ»ÏÂÊäÈëµÄÓû§ÃûºÍÃÜÂëÊÇ·ñ׼ȷ¡£ÁíÍ⣬Ҳ¿ÉÒÔʵÑéÐÞ¸ÄÃÜÂ룬ȻºóÔÙʵÑéÉÏ°¶¡£
¼ì²é²î±ðRepositoryµÄȨÏÞÉèÖÃ
ÈôÊÇÓû§²»¿ÉÅþÁ¬µ½Ò»¸öÌض¨µÄGitlab Repository£¬ÄÇôÓпÉÄÜÊÇÓÉÓÚ¸ÃRepositoryµÄȨÏÞÉèÖñ»¸ü¸ÄÁË¡£ÈôÊÇÕâÊÇÎÊÌâËùÔÚ£¬Óû§¾ÍÐèÒªÁªÏµÖÎÀíÔ±»òRepositoryµÄÓµÓÐÕߣ¬ÒÔ»ñµÃÏìÓ¦µÄȨÏÞ¡£±ðµÄ£¬Ò²¿ÉÒÔʵÑé¼ì²éÆäËûRepositoryµÄȨÏÞÉèÖ㬿´¿´ÊDz»ÊÇËùÓж¼ÎÞ·¨ÅþÁ¬¡£
¼ì²éGitlabµÄÉèÖÃÎļþ
ÈôÊÇÇ°Á½ÖÖÒªÁ춼ûÓнâ¾öÎÊÌ⣬ÎÒÃǾÍÐèÒª¼ì²éÒ»ÏÂGitlabµÄÉèÖÃÎļþÊÇ·ñ׼ȷ¡£Ò»Ð©Ð§ÀÍÆ÷ÉèÖùýʧ£¬¿ÉÄܵ¼ÖÂÓû§²»¿ÉÕý³£ÉÏ°¶Gitlab¡£Ê¹ÓÃÈçÏÂÏÂÁî¿ÉÉó²éGitlabµÄÉèÖÃÎļþ£º
sudo cat /etc/gitlab/gitlab.rb
µÇ¼ºó¸´ÖÆ
¼ì²éGitlabµÄÈÕÖ¾Îļþ
ÈôÊÇGitlab²»¿ÉÉÏ°¶£¬ÎÒÃÇ»¹¿ÉÒÔ¼ì²éÒ»ÏÂGitlabµÄÈÕÖ¾Îļþ£¬Éó²é³ÌÐòÊÇ·ñÓöµ½ÁËÈκιýʧ¡£Ê¹ÓÃÈçÏÂÏÂÁî¿ÉÉó²éGitlabÈÕÖ¾Îļþ£º
sudo tail -f /var/log/gitlab/gitlab-rails/production.log
µÇ¼ºó¸´ÖÆ
¼ì²éÍøÂçÅþÁ¬
×îºó£¬ÈôÊÇGitlabÒÀÈ»ÎÞ·¨ÉÏ°¶£¬ÎÒÃÇ¿ÉÄÜÐèÒª¼ì²éÍøÂçÅþÁ¬ÊÇ·ñÕý³£¡£ÓÐʱ£¬ÍøÂçÎÊÌâ¿ÉÄܵ¼ÖÂÎÞ·¨ÅþÁ¬µ½Ð§ÀÍÆ÷¡£ÈôÊÇ·¢Ã÷ÍøÂçÅþÁ¬·ºÆðÎÊÌ⣬¿ÉÒÔʵÑéÖØÆôЧÀÍÆ÷»òÕßʵÑé±ðµÄÍøÂçÅþÁ¬·½·¨¡£
×ÛÉÏËùÊö£¬ÎÞ·¨ÉÏ°¶GitlabÓÐÐí¶àÔµ¹ÊÔÓÉ£¬¿ÉÊÇÕâЩÎÊÌⶼ¿ÉÒÔͨ¹ýÒÔÉÏÕâЩҪÁì½â¾ö¡£²»¹ÜÔÚ½â¾öÎÊÌâʱ½ÓÄÉÁËÄÄÖÖÒªÁ죬ÎÒÃǶ¼ÐèÒªÄÍÐĵØʵÑ飬ȷ±£¾¡¿ÉÄܶàµØɨ³ýÎÊÌ⡣ͨ¹ýÒ»Ö±µØʵÑ飬×îÖÕÎÒÃÇÒ»¶¨¿ÉÒÔ½â¾öÕâÒ»ÎÊÌ⣬ÈÃGitlabÖØлָ´Õý³£ÔËÐС£
ÒÔÉϾÍÊÇgitlabÄܸüв»¿ÉÉÏ°¶ÍøÕ¾Ôõô°ìµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡