尝试将Heroku应用程序克隆到本地计算机时出错

时间:2017-06-16 10:43:22

标签: git ubuntu heroku clone heroku-cli

我在heroku上运行应用程序。但不幸的是,最近我丢失了我的硬盘上的文件,现在我试图在我的硬盘上克隆我的后端。

我尝试从heroku cli运行以下命令将我的应用程序克隆到我的本地计算机上:

heroku git:clone -a myAppName

但是我收到了这个错误:

▸ ENOENT: spawn git ENOENT 知道问题是什么吗?

THX

2 个答案:

答案 0 :(得分:1)

解决方案:移除snap herokuapt-get并通过$ sudo snap remove heroku $ sudo add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./" $ curl -L https://cli-assets.heroku.com/apt/release.key | sudo apt-key add - $ sudo apt-get update $ sudo apt-get install heroku 安装

IF OBJECT_ID('tempdb..#TestData', 'U') IS NOT NULL 
DROP TABLE #TestData;

CREATE TABLE #TestData (
    Bmp INT NOT NULL PRIMARY KEY CLUSTERED, 
    Emp INT NOT NULL, 
    SomeVal INT NOT NULL
    );
INSERT #TestData (Bmp, Emp, SomeVal) 
SELECT 0, 1, 1 UNION ALL
SELECT 1, 2, 1 UNION ALL
SELECT 2, 3, 2 UNION ALL
SELECT 3, 4, 2 UNION ALL
SELECT 4, 5, 1;

--==============================================

WITH 
    cte_GroupStart AS (
        SELECT 
            td.Bmp, 
            td.Emp, 
            td.SomeVal,
            GroupStart = CASE WHEN td.SomeVal = LAG(td.SomeVal, 1) OVER (ORDER BY td.Bmp) THEN NULL ELSE ROW_NUMBER() OVER (ORDER BY td.Bmp) END 
        FROM
            #TestData td
        ),
    cte_FillGroup AS (
        SELECT 
            gs.Bmp, 
            gs.Emp, 
            gs.SomeVal, 
            AggGroup = MAX(gs.GroupStart) OVER (ORDER BY gs.Bmp)    --  ROWS UNBOUNDED PRECEDING is implied and should work as expected 2008
        FROM
            cte_GroupStart gs
        )
SELECT 
    Bmp = MIN(fg.Bmp),
    Emp = MAX(fg.Emp),
    fg.SomeVal
FROM
    cte_FillGroup fg
GROUP BY
    fg.AggGroup,
    fg.SomeVal
ORDER BY 
    fg.AggGroup;

答案 1 :(得分:0)

这意味着找不到git。您需要安装它或将其添加到路径环境变量