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] Unable to import repository from GitHub when branch name is not 'main' #3474

Closed
KevinYouu opened this issue Feb 11, 2024 · 6 comments
Closed

Comments

@KevinYouu
Copy link

I encountered an issue where importing a repository from GitHub fails when the branch name is not 'main'. The import process consistently displays Import in progress.... Additionally, when I commit locally with a branch name other than 'main', the committed code appears empty after submission.
截屏2024-02-11 22 22 36

@flowck
Copy link

flowck commented Feb 14, 2024

I tried it out of curiosity and I was able to successfully import a repository.

Repo imported: https://github.com/beego/beego

docker run -d \
  -p 3000:3000 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /tmp/gitness:/data \
  --name gitness \
  --restart always \
  harness/gitness

Screenshot 2024-02-14 at 20 04 59

@KevinYouu
Copy link
Author

I tried it out of curiosity and I was able to successfully import a repository.

Repo imported: https://github.com/beego/beego

docker run -d \
  -p 3000:3000 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /tmp/gitness:/data \
  --name gitness \
  --restart always \
  harness/gitness

Screenshot 2024-02-14 at 20 04 59

I'm deploying using docker-compose on Debian 12 operating system. Below is the configuration file. I'm encountering issues importing GitHub repositories.

version: '3'
services:
  gitness:
    container_name: gitness
    image: harness/gitness
    network_mode: host
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ~/gitness:/data
    restart: unless-stopped
image

@abolast
Copy link

abolast commented Mar 4, 2024

services:
  gitness:
    image: harness/gitness
    container_name: gitness
    ports:
      - "3009:3000"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /home/abola/Documents/docker-compose-gitanyway/data:/data
    restart: always
    networks:
      gitea2:
        ipv4_address: 172.22.0.6

unable to import repository too. i tried from gogs and gitea.

@zzinx58
Copy link

zzinx58 commented Mar 5, 2024

The same, Bad experience, sad..

@zzinx58
Copy link

zzinx58 commented Mar 5, 2024

This issue could cause by using proxy i guess this is the point.
After set Organization Name as my github username:zzinx58,
Repository name: [projectName].git
I am able to come to the next step.

@hitesharinga
Copy link
Collaborator

Hey @KevinYouu, Thanks for reporting the issue.
I tried to import the repo you mentioned and was able to import it successfully.
On the second issue - We have added support to update the default branch in the first commit if the first commit is not in the default branch.

Please reopen if you face the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants