Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Deploying new resource via "Public Repository" runs into git error #4922

Closed
ninode97 opened this issue Jan 22, 2025 · 1 comment
Closed

Comments

@ninode97
Copy link

Error Message and Logs

Hello, I run into weird error where I can't deploy resource which comes from public github repository.

Some logs:

2025-Jan-22 13:52:59.407293
Starting deployment of TestStack/teststack.github.com:main to valrate-1.
2025-Jan-22 13:52:59.662052
Preparing container with helper image: ghcr.io/coollabsio/coolify-helper:1.0.5.
2025-Jan-22 13:52:59.798789
docker rm -f v48ockgoc8k0cswscowoo8ok
2025-Jan-22 13:52:59.798789
Error response from daemon: No such container: v48ockgoc8k0cswscowoo8ok
2025-Jan-22 13:52:59.977322
docker run -d --network coolify --name v48ockgoc8k0cswscowoo8ok --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/coollabsio/coolify-helper:1.0.5
2025-Jan-22 13:52:59.977322
4ce42641799e362d1655861e881709bde0a94c9fa23d13f0b39e8feb4b4244c3
2025-Jan-22 13:53:01.100852
Image not found (ds4kgwg8k4cgs84k88k8wgos:HEAD). Building new image.
2025-Jan-22 13:53:01.106184
----------------------------------------
2025-Jan-22 13:53:01.111062
Importing TestStack/teststack.github.com:main (commit sha HEAD) to /artifacts/v48ockgoc8k0cswscowoo8ok.
2025-Jan-22 13:53:01.314922
docker exec v48ockgoc8k0cswscowoo8ok bash -c 'git clone -b "main" https://github.com/TestStack/teststack.github.com /artifacts/v48ockgoc8k0cswscowoo8ok && cd /artifacts/v48ockgoc8k0cswscowoo8ok && sed -i "s#git@\(.*\):#[https://\1/#g"](https://0.0.0.1/#g%22) /artifacts/v48ockgoc8k0cswscowoo8ok/.gitmodules || true && cd /artifacts/v48ockgoc8k0cswscowoo8ok && GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" git submodule update --init --recursive && cd /artifacts/v48ockgoc8k0cswscowoo8ok && GIT_SSH_COMMAND="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" git lfs pull'
2025-Jan-22 13:53:01.314922
Cloning into '/artifacts/v48ockgoc8k0cswscowoo8ok'...
2025-Jan-22 13:53:01.593850
fatal: Remote branch main not found in upstream origin
2025-Jan-22 13:53:01.615066
fatal: not a git repository (or any of the parent directories): .git
2025-Jan-22 13:53:01.974059
Oops something is not okay, are you okay? 😢
2025-Jan-22 13:53:01.976636
Cloning into '/artifacts/v48ockgoc8k0cswscowoo8ok'...
2025-Jan-22 13:53:01.976636
fatal: Remote branch main not found in upstream origin
2025-Jan-22 13:53:01.976636
fatal: not a git repository (or any of the parent directories): .git
2025-Jan-22 13:53:01.979168
Deployment failed. Removing the new version of your application.

I have tried other repositories and it seems to produce same issue.

Just, while writing this issue, I tried to test another repository (https://github.com/trekab/skilled-e-learning-landing-page/).
And it seems to deploy it correctly.

The main difference seems to be that in previous repository, the main branch is called master and in this new repo, it is main branch.

Steps to Reproduce

  1. New Resource.
  2. Under Applications, Git Based - select "Public Repository".
  3. Select available server.
  4. Paste public repository url, e.g. https://github.com/TestStack/teststack.github.com.git and click "Check Repository".
  5. Then in the "Create a new Application" modal, select build pack "Static" and click continue.
  6. Within configuration page, click "Deploy".

Example Repository URL

No response

Coolify Version

v4.0.0-beta.387

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24.04.1 LTS

Additional Information

So from my understanding, it seems to be failing due to branch named main not being available within the repository.
As from the logs we can see it, somehow decided to use main:

docker exec v48ockgoc8k0cswscowoo8ok bash -c 'git clone -b "main" https://github.com/TestStac******************************

For me, it's not big issue as I was just testing out coolify, but thought I would create this as an issue.

@ninode97 ninode97 added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Jan 22, 2025
@peaklabs-dev
Copy link
Member

Yes that is because you need to change the branch name to master for it to work, the default is main:

Image

@github-actions github-actions bot removed 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants