无法将SourceTree连接到AWS CodeCommit [英] Failed to connect SourceTree to AWS CodeCommit

查看:390
本文介绍了无法将SourceTree连接到AWS CodeCommit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Atlassian的SourceTree在Mac OS上与git一起使用,并选择AWS CodeCommit作为远程托管服务器。



在这些



然后尝试将已创建的空仓库从AWS克隆到SourceTree:



我得到了打印出来的错误:


中止:HTTP错误403:禁止使用aws --profile默认代码提交
凭据帮助者$ @得到:aws:找不到命令致命:无法
访问
'



我错过了什么吗?

解决方案

我还没有已对此进行了测试,但考虑到AWS CodeCommit可以简化凭证帮助程序,并且错误命令不正确und ,我假设您受到SourceTree知识库文章凭据助手 git:'credential-osxkeychain'不是git命令。请参阅'git --help'。


由于Git调用了此帮助程序,并且无法找到
,这意味着它已被定义但尚未在PATH上找到。就$ Tree $ 1.6.3版本的SourceTree而言,这没什么好担心的。
有两种停止方式


  1. 不推荐,但是如果您仅将SourceTree用于
    ,则可以删除所有凭据从
    / usr / local / git / etc / gitconfig配置中进行设置,这是一种快速简便的
    方法,但这确实意味着终端上的操作可能无法使
    进行身份验证。

  2. 建议在SourceTree应用程序资源中的
    git-credential-osxkeychain与
    本地git安装之间创建符号链接。



    ln -s / usr / local / git / bin / git-credential-osxkeychain
    /Applications/SourceTree.app/Contents/Resources/git_local/bin / git-credential-osxkeychain



当然,由于AWS CodeCommit需要证书助手到位,只有解决方案2在概念上适用于您的方案,并且您需要根据CodeCommit凭据助手的需要调整链接源和目标。


I'm using Atlassian's SourceTree to work with git on Mac OS, and choose AWS CodeCommit as the remote hosting server.

Following these steps for HTTPs connection between AWS and my local repo,

here's how my git config --global --edit looks like:

Then try to clone a created empty repo from AWS to SourceTree:

And I get error printed out:

abort: HTTP Error 403: Forbidden aws --profile default codecommit credential-helper $@ get: aws: command not found fatal: unable to access 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/my-git-repo/': The requested URL returned error: 403

UPDATE

Tried the answer provided by @Steffen Opel and got more like:

Did I miss anything?

解决方案

I have not tested this, but given AWS CodeCommit facilitates a credential helper too and the error beingcommand not found, I would assume you are affected by the same issue outlined in the SourceTree Knowledge Base article Credential helpers "git: 'credential-osxkeychain' is not a git command. See 'git --help'.":

The error [...] occurs because Git calls this helper and cannot find it meaning it has been defined and yet not found on the PATH. In terms of SourceTree as of version 1.6.3 this is nothing to worry about. There's two ways to stop this from happening.

  1. Not recommended, but if you're solely using SourceTree for everything you could remove the 'credential' setting from the /usr/local/git/etc/gitconfig config. This is a quick and easy method, but it does mean operations at the terminal may not be able to authenticate.
  2. Recommended, create a symlink between git-credential-osxkeychain in the SourceTree app resources and your local git install.

    ln -s /usr/local/git/bin/git-credential-osxkeychain /Applications/SourceTree.app/Contents/Resources/git_local/bin/git-credential-osxkeychain

Of course, since AWS CodeCommit requires the credential helper to be in place, only solution 2 is conceptually applicable for your scenario and you need to adjust the link source and targets as appropriate for the CodeCommit credential helper.

这篇关于无法将SourceTree连接到AWS CodeCommit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆