2017-08-24 60 views
0

我是亚马逊codecommit的新成员。如何在Gitlab和Amazon CodeCommit之间切换Intellij Idea项目vcs?

按照他们的指示,我不喜欢下面

  • 一些作品作出新的IAM用户与AdministratorAccess
  • 作出新codecommit库
  • 安装awscli并做aws configure

当我正确地完成了这些事情,我可以从codecommit中拉出/推送。 但是,它通过intellij Idea被禁用。

我不喜欢的东西......

  • 我拉一个项目从gitlab
  • git remote rm origin
  • git remote add origin [code commit url]
  • git branch --set-upstream-to origin/master

现在我型git [pull/push] origin master,我得到这个错误信息。

unable to access 'https://git-codecommit.ap-northeast-1.amazonaws.com/v1/repos/test17/': The requested URL returned error: 403 

当我通过浏览器访问此URL时,它需要id/pw。但我的IAM用户帐户信息不起作用。

我该怎么办?有没有办法在intellij中切换gitlab和codecommit?

谢谢。

回答

0

IntelliJ不使用awscli。它使用默认的系统shell。

从描述中看来,推/拉对于本机shell中的命令行git不起作用,所以问题与IntelliJ不相关。

很可能git尝试使用保存在其credential.helper中的错误凭证,这就是为什么它失败。

检查git config credential.helper以查看是否有配置。如果有,请尝试禁用它或清除保存的凭据。

0

从描述中可以看出,您尝试使用https连接到Intellij中的CodeCommit存储库。为此,您需要在IAM控制台中为您的iam用户生成GitCredentials(用户名/密码)。 详细步骤都记录在AWS文档中:http://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html

一旦你的用户名/密码,您可以使用这些凭据来连接到您的IntelliJ库CodeCommit。

相关问题