简体   繁体   English

如何在PhpStorm中添加私有远程git存储库?

[英]How to add a private remote git repository in PhpStorm?

This might seem like a stupid question but I can't find the information in the PhpStorm docs. 这似乎是一个愚蠢的问题,但我在PhpStorm文档中找不到该信息。

  • I have created a private, empty git repository on GitLab. 我在GitLab上创建了一个私人的,空的git仓库。
  • I created a local project with composer to install a framework. 我使用composer创建了一个本地项目来安装框架。

Now I want to connect this local project with the private repository on GitLab. 现在,我想将此本地项目与GitLab上的私有存储库连接。

But every time I try to add the remote I can't find an option to add any credentials of sorts so naturally it fails telling me it can't find the remote or it got rejected. 但是每次我尝试添加遥控器时,我都找不到添加任何种类凭据的选项,因此自然无法告诉我找不到遥控器或它被拒绝了。

I know there are other ways to do this but I've done a setup like this before a long time ago. 我知道还有其他方法可以做到这一点,但是很久以前我已经完成了这样的设置。

Here is what you'd normally do 这是你通常要做的

git remote add gitlab url-to-gitlab-repo
git push gitlab master

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM