代码之家  ›  专栏  ›  技术社区  ›  Carmine Tambascia

AWS codecommit无法使用Git凭据通过HTTPS协议连接到第二个repo

  •  0
  • Carmine Tambascia  · 技术社区  · 7 年前

    不需要注意,Repositoy已经在本地存在,因此,我通过 SSH 第一次,推送所有代码,然后使用HTTPS和 git credentials .

    我在第一个存储库中使用了根帐户(尽管出于安全原因不建议使用),因为它只是一个测试项目回购,并且仍然熟悉AWS。然后,由于设置使用SourceTree很简单(我在下面做的一切都很好) instructions 我还设置了通过HTTPS访问这个repo1的权限。

    几个月后,我决定在同一个账户(根账户)上进行另一次回购。

    enter image description here

    正在执行

    git remote -v
    

    不幸的是,因为我试图添加蜜蜂。txt,SourceTree在不要求我添加或提交文件的情况下运行,并手动添加,我得到以下结果:

    fatal: Unable to create 
    'C:/Users/Carmine/.virtualenvs/DL/Scripts/src/.git/index.lock': File 
    exists.
    
    If no other git process is currently running, this probably means a
    git process crashed in this repository earlier. Make sure no other git
    process is running and remove the file manually to continue.
    

    (它似乎在试图改变,因此确实添加了一个新文件,即索引,但该文件忙于处理某些事情,因此无法继续)。

    1 回复  |  直到 7 年前
        1
  •  0
  •   Carmine Tambascia    7 年前

    我摆脱了git错误,执行为 here

    然后通过命令行添加测试文件和提交的测试文件。然后,由于存储库中已经填充了文件,我添加了它们。