Unable to deploy
aakash-dhar
PROOP

2 months ago

Hi i am unable to deploy my projects in railway getting this error :

stage-0

RUN python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt

6s

Collecting git+https://****@github.com/backend-v2.git@qa-server#subdirectory=library/relay (from -r requirements.txt (line 115))

Cloning https://****@github.com/backend-v2.git (to revision qa-server) to /tmp/pip-req-build-plc3twe6

Running command git clone --filter=blob:none --quiet 'https://****@github.com/backend-v2.git' /tmp/pip-req-build-plc3twe6

remote: Repository not found.

fatal: repository 'https://github.com/backend-v2.git/' not found

error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet 'https://****@github.com/backend-v2.git' /tmp/pip-req-build-plc3twe6 did not run successfully.

│ exit code: 128

╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet 'https://****@github.com/-backend-v2.git' /tmp/pip-req-build-plc3twe6 did not run successfully.

│ exit code: 128

╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Dockerfile:20

-------------------

18 | ENV NIXPACKS_PATH=/opt/venv/bin:$NIXPACKS_PATH

19 | COPY . /app/.

20 | >>> RUN --mount=type=cache,id=s/8db99343-20c2-495d-b1ea-a4f13abf7298-/root/cache/pip,target=/root/.cache/pip python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt

21 |

22 | # build phase

-------------------

ERROR: failed to build: failed to solve: process "/bin/bash -ol pipefail -c python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt" did not complete successfully: exit code: 1

Error: Docker build failed

is there an downtime going with deployment

$10 Bounty

3 Replies

gabztoo
FREE

2 months ago

Hi! This is not a Railway downtime.

The deployment is failing because pip install -r requirements.txt is trying to clone a GitHub repository and GitHub is returning “Repository not found”.

From the logs, the dependency points to:

https://github.com/backend-v2.git

This URL is invalid because GitHub repositories must include the owner/organization name, for example:

https://github.com/<OWNER>/backend-v2.git

Additionally, if this repository is private, the build environment must be authenticated. Otherwise, GitHub returns “Repository not found” even if the repo exists.

How to fix:

  1. Verify the GitHub URL in requirements.txt (around line 115) and make sure it includes the correct owner.

  2. If the repository is private, authenticate one of the following ways:

    • Use an SSH deploy key and reference the repo via git+ssh://

    • Use a GitHub Personal Access Token with access to the repository

  3. Confirm that the referenced branch/tag (qa-server) exists.

Once the URL and authentication are corrected, the deployment should succeed.


aakash-dhar
PROOP

2 months ago

the urls are correct i have removed them manually this is the original log

stage-0

RUN python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt

6s

Collecting git+https://****@github.com/xopolis/protobots-backend-v2.git@qa-server#subdirectory=library/relay (from -r requirements.txt (line 115))

Cloning https://****@github.com/xopolis/protobots-backend-v2.git (to revision qa-server) to /tmp/pip-req-build-plc3twe6

Running command git clone --filter=blob:none --quiet 'https://****@github.com/xopolis/protobots-backend-v2.git' /tmp/pip-req-build-plc3twe6

remote: Repository not found.

fatal: repository 'https://github.com/xopolis/protobots-backend-v2.git/' not found

error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet 'https://****@github.com/xopolis/protobots-backend-v2.git' /tmp/pip-req-build-plc3twe6 did not run successfully.

│ exit code: 128

╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet 'https://****@github.com/xopolis/protobots-backend-v2.git' /tmp/pip-req-build-plc3twe6 did not run successfully.

│ exit code: 128

╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Dockerfile:20

-------------------

18 | ENV NIXPACKS_PATH=/opt/venv/bin:$NIXPACKS_PATH

19 | COPY . /app/.

20 | >>> RUN --mount=type=cache,id=s/8db99343-20c2-495d-b1ea-a4f13abf7298-/root/cache/pip,target=/root/.cache/pip python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt

21 |

22 | # build phase

-------------------

ERROR: failed to build: failed to solve: process "/bin/bash -ol pipefail -c python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt" did not complete successfully: exit code: 1

Error: Docker build failed


gabztoo
FREE

2 months ago

Thanks for the full log, this confirms it’s not Railway.

Railway is running pip install -r requirements.txt, and during that step it tries to clone this dependency:

git+https://<token>@github.com/xopolis/protobots-backend-v2.git@qa-server#subdirectory=library/relay

GitHub is returning:

Repository not found (404)

Important detail: on GitHub, “Repository not found” often means “no permission” (especially for private repos). So even if the URL is correct, the build container cannot access it.

What this usually means

One of these is happening:

  1. The repo is private and the token has no access

  • The token is missing repo permission (classic PAT), or

  • A fine-grained token isn’t granted access to this repo/org, or

  • The token is expired/revoked.

  1. The token is not actually being passed in the Railway build

  • Sometimes you saved the token locally, but Railway is building in a clean environment.

  • If it’s hardcoded in requirements, it must be valid and have access.

  1. Org policy / SSO requirement

  • If the repo is in an org that enforces SSO, the token may need SSO authorization.

Maybe fix:

Option A (cleanest): Use an SSH deploy key

  • Create an SSH deploy key on xopolis/protobots-backend-v2 (read-only is fine)

  • Add the private key to Railway (as the repo/build SSH key)

  • Change dependency to SSH:

git+ssh://git@github.com/xopolis/protobots-backend-v2.git@qa-server#subdirectory=library/relay

Option B: Use a GitHub token that definitely has access

  • Create a PAT with access to that repo (repo scope for classic PAT, or fine-grained with explicit repo access)

  • Make sure it’s authorized for org/SSO if needed

  • Then redeploy.

Quick test to confirm

If you try cloning that repo locally using the same token and it fails, it’s 100% an auth/access issue (not Railway).


Loading...