本文介绍了去私人gitlab回购的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尽管我尝试使用"go get"从gitlab获取私有存储库都无法成功我已经尝试使用.netrc,gitconfig,但是它不起作用.我有一台带有git的私人计算机,假设它是mymachine.prv

Despite all the attempts I can't succeed in using "go get" to get a private repo from gitlabI've tried with .netrc, gitconfig but it doesnt work.I have a private machine with git on it, suppose it is mymachine.prv

git config --global url."[email protected]:".insteadOf "https://mymachine.prv/"

我使用用户"gp"从虚拟机运行此命令并不断询问我[email protected]的密码

I run this command from a virtual machine with user "gp"and it keeps asking me the password for [email protected]

所以我已经用ssh-keygen生成了公钥,并将其添加到gitlab帐户,但是没有运气.

So I have generated the public key with ssh-keygen and added to gitlab account, but no luck.

请帮忙吗?

Gianpaolo

Gianpaolo

推荐答案

我想它应该可以为您提供帮助.您错过了ssh://

I guess it should helps you. You miss the ssh://

例如,发布其工作方式: https://www.scivision .dev/git-pull-https-push-ssh/

Post for example how it works: https://www.scivision.dev/git-pull-https-push-ssh/

git config --global url."ssh://[email protected]/".insteadOf "https://mymachine.prv/"

这篇关于去私人gitlab回购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 04:30