Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
BM - Help needed for Git checkout
-
Hi,
I have some problem to make git-checkout running properly
I created one application linked to gitlab repository.
This part is working fine
I created a pipelinestage and I ran this script :
set $DestFolder = /opt/${ApplicationName}; Ensure-Directory $DestFolder; { Git::Checkout-Code ( To: $DestFolder, ); }
As I understand, the Git::Checkout-code will grab the code from $Repository, but it can't reach the gitlab server
.
I have done a second application, where I am using Git::Checkout-Code but I had all the expected variables manually and it is working fine.
I thought if the application is linked to the git repo, it is transparent and I don't need to add the infor i n the checkout function.Something is missing but I don't know what exactly, any advice, example is welcome
Thanks
Philippe
-
Hmmm, good question; 8min: 20seconds is quite a long time. So I guess, there's a timeout going on? Maybe it's a prompt for input that's happening? I dunno why that would be the case.
There's a lot of logs missing, so we can't really see where it's failing. Does it work if you're checking out to a Windows server (maybe localhost?)
I thought if the application is linked to the git repo, it is transparent and I don't need to add the infor i n the checkout function.
The build is associated with a Commit/Branch/Repository. The operation will effectively default as follows:
Git::Checkout-Code ( From: $Repository, BranchOrCommit: $Commit );
$Repository will just be the name of your connection, and before running on the remote server, the url/username/password will be extracted from the connection.
Thanks,
Alana
-
@atripp said in BM - Help needed for Git checkout:
There's a lot of logs missing, so we can't really see where it's failing. Does it work if you're checking out to a Windows server (maybe localhost?)
In fact, it never ends. - more than one hour running
And I made a test on localhost build it is a docker setup
so I have the same resultI will make some tests
-
I ran on localhost (ia the buildmaster server) and the chekout is working fine.
Same script on target server => not working
I will capture and make an artifact to overcome the problem
Do you thin this is a bug or is it something I misused ?
Best regards
Philippe
-
Thanks for clarifying! So it sounds like the issue is, the
Git::Checkout-Code
operation is freezing on a remote server (connected via SSH).I don't think there's anything you're doing wrong, but there's clearly something going on. It's hard to guess what; typically an input prompt is about the only thing that will cause a freeze like that -- but I don't know how that can happen with that operation.
From here, i would check out the sshd logs, and see what's going on between the servers. You should see the last ssh command ran, and maybe that will give some kind of clue as to a problem
-
from sshd log, the bm server make a connection, create the tmp folder and nothing else happen since I cancel the job
2023-08-29 14:41:46 # VM004073 # info # sshd[1887]: # Accepted publickey for root from 10.101.4.65 port 35342 ssh2: ED25519 ***************************** 2023-08-29 14:41:46 # VM004073 # info # sshd[1887]: # pam_unix(sshd:session): session opened for user root(uid=0) by (uid=0) 2023-08-29 14:41:47 # VM004073 # info # systemd-logind[833]: # New session 74 of user root. 2023-08-29 14:41:47 # VM004073 # info # systemd: # pam_unix(systemd-user:session): session opened for user root(uid=0) by (uid=0) 2023-08-29 14:48:25 # VM004073 # info # sshd[1887]: # Received disconnect from 10.101.4.65 port 35342:11: Normal disconnect 2023-08-29 14:48:25 # VM004073 # info # sshd[1887]: # Disconnected from user root 10.101.4.65 port 35342 2023-08-29 14:48:25 # VM004073 # info # sshd[1887]: # pam_unix(sshd:session): session closed for user root 2023-08-29 14:48:25 # VM004073 # info # systemd-logind[833]: # Session 74 logged out. Waiting for processes to exit. 2023-08-29 14:48:25 # VM004073 # info # systemd-logind[833]: # Removed session 74.
-
Hmm that's really peculiar; we haven't seen an issue like this, so I'm not sure how to troubleshoot.
I don't think this is operation-specific, so I wonder if you could try some other tests on this server. Perhaps do something simple, like
shexec echo hello world
; ? And perhaps see if it's an issue on other servers?Thanks,
Alana
-
@atripp said in BM - Help needed for Git checkout:
shexec echo hello world;
I have no issue to run a shexec. This is just the git-checkout.
The server is also configured thru Otter without any problems ...I am using artifact captured from localhost so it is OK for me
I will make other tests later