Spa*_*ide 5 python git pip heroku
我有一个应用程序,刺猬(https://github.com/qfq8wf77qwf8/hedgehog-test),我正在heroku上部署它。这是文件结构:
\n\nhedgehog/\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 Procfile\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 README.md\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 hedgehog\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 __init__.py\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 __init__.pyc\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 app.db\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 simple_page\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 __init__.py\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 __init__.pyc\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 models.py\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 models.pyc\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 views.py\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 views.pyc\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 hedgehog.egg-info\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 PKG-INFO\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 SOURCES.txt\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 dependency_links.txt\n\xe2\x94\x82\xc2\xa0\xc2\xa0 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 top_level.txt\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 requirements.txt\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 setup.py\nRun Code Online (Sandbox Code Playgroud)\n\n关于我的设置的一些注意事项:
\n\n目前,我hedgehog通过本地安装应用程序pip install -e .\n这工作正常 - 我可以使用flask run和运行我的应用程序heroku local运行我的应用程序。我还可以在 heroku 上部署这个应用程序。
我唯一的问题是,当我执行 pip freeze 时,我意识到我的本地应用程序显示为:
\n\n-e git+git@github.com:qfq8wf77qwf8/hedgehog-test.git@12a6c0a1bf00b76c6a18e15d295fde6b70814fbd#egg=hedgehog
如果我将其保留在 requests.txt 中,我的部署将失败并显示以下消息:
\n\nremote: Obtaining hedgehog from git+https://git.heroku.com/hedgehog.git@101439e90d0681e4952bd94ff7224d16e92d1b45#egg=hedgehog (from -r /tmp/build_fb9c8c5a426fa15f54b4e074abe57c25/requirements.txt (line 8))\nremote: Cloning https://git.heroku.com/hedgehog.git (to 101439e90d0681e4952bd94ff7224d16e92d1b45) to /app/.heroku/src/hedgehog\nremote: fatal: could not read Username for \'https://git.heroku.com\': No such device or address\nremote: Command "git clone -q https://git.heroku.com/hedgehog.git /app/.heroku/src/hedgehog" failed with error code 128 in None\nremote: ! Push rejected, failed to compile Python app.\nremote:\nremote: ! Push failed\nRun Code Online (Sandbox Code Playgroud)\n\n我通过手动更改-e git+git@github.com:qfq8wf77qwf8/hedgehog-test.git@12a6c0a1bf00b76c6a18e15d295fde6b70814fbd#egg=hedgehog\n来解决这个问题e .来解决这个问题。
有一个更好的方法吗?
\n