1

I want to clone a project hosted on an enterprise Gitlab from GitHub workflow.

steps:   

- run: |
    
    git clone https://gitlab.xyz.net/Group/project.git

Running above gives me error

Cloning into 'project'...
fatal: could not read Username for 'https://gitlab.xyz.net': No such device or address
Error: Process completed with exit code 128.
rizways
  • 319
  • 2
  • 5

1 Answers1

3

A private GitLab server does not have public repositories by all chances, so you probably need to authenticate for example like this:

- name: Clone private repo
  run: git clone "https://username:$EXTERNAL_TOKEN@github.company.com/my-org/my-repo" main
  env:
    EXTERNAL_TOKEN : ${{ secrets.EXTERNAL_TOKEN }}
timmeinerzhagen
  • 772
  • 7
  • 10