Closed comm1x closed 4 months ago
Paste your ~/.gitlab-ci-local/variables.yml
, env | grep GCL_
, <project>/.gitlab-ci-local-env
and cd <project>/ && git remote -v
(Mask your secrets)
Is you gitlab instance actually located on https://p.shorokhov
?
Also this https://github.com/firecow/gitlab-ci-local?tab=readme-ov-file#quirks
~/.gitlab-ci-local
not exists
env | grep GCL_
empty
$project/.gitlab-ci-local-env: VARIABLE="CI_JOB_TOKEN=... CI_PIPELINE_SOURCE=merge_request_event CI_MERGE_REQUEST_ID=1"
git remote -v:
origin ssh://git@gitlab.mydomain.ru:5555/myrepo/myapp.git (fetch)
origin ssh://git@gitlab.mydomain.ru:5555/myrepo/myapp.git (push)
Is you gitlab instance actually located on https://p.shorokhov ?
No, this is my username. Gitlab is on gitlab.mydomain.ru
UPD: It is wrong, https://github.com/firecow/gitlab-ci-local/issues/1178#issuecomment-2068822175
You must have some setting somewhere in the <project>/.git
, global git settings, or gitlab-ci-local variables or env settings, that makes gitlab-ci-local
resolve https://p.shorokhov as being the place to go.
I have User p.shorokhov
in .ssh/config
in gitlab host. Can't find any other entries.
@comm1x
Are you showing your full git remote -v
?
Is this the error you're seeing?
@firecow
instead of git remote -v
shall we hard-codegit remote get-url origin
@ANGkeith thanks for you comment, I posted wrong data from .git/config above.
The problem related with usage https
in origin
configuration in .git/config
:
[remote "origin"]
# This is not working
url = https://p.shorokhov:sometoken@gitlab.mydomain.ru/myrepo/myproject.git
# This works correctly
url = ssh://git@gitlab.mydomain.ru:5555/myrepo/myproject.git
@comm1x
Are you showing your full
git remote -v
?Is this the error you're seeing?
Yes, this is equal error.
@firecow instead of
git remote -v
shall we hard-codegit remote get-url origin
If this command works better, sure :smile:
https://github.com/firecow/gitlab-ci-local/pull/1202 should fix this problem
also note that the remote-url is customizable via git remote add-url gcl-origin
Minimal .gitlab-ci.yml illustrating the issue
Expected behavior GCL download config.yml from Gitlab and use it.
Actual behavior GCL use my username as
remote.host
and failed with errorHost information Macos gitlab-ci-local 4.47.0
Containerd binary Docker
Gcl failed in this
git clone
command: https://github.com/firecow/gitlab-ci-local/blob/c6d78471ca2b4305572cc31b131f96cb6416bd5e/src/parser-includes.ts#L190