Automic Workload Automation

 View Only
  • 1.  Problem configuring git version control (gitlab)

    Posted Aug 18, 2022 04:00 AM
    Dear Community,
    I recently tried to setup git version control in UC4.
    What did I do?
    I created a repository on my gitlab instance
    I creates  c:\ssh and generated ssh keys on the server where UC4 runs
    I uploaded the public key to my gitlab instance
    I configured the UC_CLIENT_SETTINGS as seen below

    When I open the 'Version Control' tab in 'Process Assembly' I just see a error message

    with the following stacktrace
    com.uc4.ecc.backends.exceptions.AutomationEngineAPIException: [HTTP 400] (45234) The repository cannot be reached with the provided URL and SSH Information: No detail information available.
    	at com.uc4.ecc.backends.impl.dataservice.request.RequestService.sendAndWait(RequestService.java:74)
    	at com.uc4.ecc.backends.dataservice.request.IRequestService$pbryglu.sendAndWait(Unknown Source)
    	at com.uc4.ecc.ae.repository.dataservice.impl.RepositoryService.doesRepositoryExist(RepositoryService.java:56)
    	at com.uc4.ecc.ae.repository.view.BaseRepositoryPresenter.load(BaseRepositoryPresenter.java:28)
    	at com.uc4.ecc.ae.repository.view.BaseRepositoryPresenter.isBranchAvailable(BaseRepositoryPresenter.java:50)
    	at com.uc4.ecc.framework.commons.controls.asyncwidget.AsyncLoadingContainer.lambda$createRequestCoordinator$28(AsyncLoadingContainer.java:363)
    	at com.uc4.ecc.framework.core.async.NoArgsLoaderWrapper.load(NoArgsLoaderWrapper.java:16)
    	at com.uc4.ecc.framework.core.async.NoArgsLoaderWrapper.load(NoArgsLoaderWrapper.java:7)
    	at com.uc4.ecc.framework.core.async.BaseRequestCoordinator$1$1.call(BaseRequestCoordinator.java:231)
    	at com.uc4.ecc.framework.core.pool.ContextAwareExecutorService$CallableImplementation.call(ContextAwareExecutorService.java:72)
    	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    	at java.base/java.lang.Thread.run(Unknown Source)
    Caused by: com.uc4.api.rest.exceptions.BadRequestException: [HTTP 400] (45234) The repository cannot be reached with the provided URL and SSH Information: No detail information available.
    	at com.uc4.api.rest.common.requests.RestJsonRequest.handleDefaultErrors(RestJsonRequest.java:82)
    	at com.uc4.api.rest.common.requests.RestJsonRequest.handleErrorResponse(RestJsonRequest.java:67)
    	at com.uc4.ecc.ae.repository.dataservice.requests.DoesRepositoryExistRequest.handleErrorResponse(DoesRepositoryExistRequest.java:25)
    	at com.uc4.api.rest.common.requests.RestRequest.handleResponse(RestRequest.java:60)
    	at com.uc4.api.rest.connection.RestConnection.sendRestRequestAndWait(RestConnection.java:128)
    	at com.uc4.ecc.backends.impl.dataservice.connection.RestConnectionService.sendRestRequestAndWait(RestConnectionService.java:65)
    	at com.uc4.ecc.backends.impl.dataservice.connection.RestConnectionService.sendRequestWithAuthAndWait(RestConnectionService.java:51)
    	at com.uc4.ecc.backends.impl.dataservice.request.RequestService.sendAndWait(RequestService.java:72)
    	... 13 more
    ​

    Maybe anyone has an idea on what I did wrong or missed out.
    I already checked that the repository is reachable from the server running UC4 (Win10).

    Many thanks in advance for any advice.
    Best Regards, -chris-


  • 2.  RE: Problem configuring git version control (gitlab)

    Posted Aug 19, 2022 10:38 AM
    Edited by Mick Solliday Aug 19, 2022 01:00 PM
    Chris,

    I have been working through these similar trials with DevOps Server.  If you need more in depth info for any of this, feel free to ask.

    1. From the location "C" I'm assuming you are doing this from a windows system.  If you have more than 1 application server, you'll have to make sure the private key is on all of them.  
    2. Regardless of location, security settings on the private key need to be restricted to the user running the Automic UC4 service (You can leave an Administrator group on it as well).
    3. You will need to add the fingerprint to the known_hosts file to allow your systems to reach the repository.  <-- I think this step will fix your particular error, since it fixed that one for me.
    4. Automic needs the key in PCKS #8 format.



  • 3.  RE: Problem configuring git version control (gitlab)

    Posted Aug 22, 2022 02:18 AM
    Hi Mick,
    thanks for sharing your knowledge.

    But somehow this still does not work.
    - I created a PCKS #8 key and added it to the gitlab instance
    - I added the gitlab servers fp to the known_hosts
    - I restricted the c:\ssh folder to the User the server runs under (system)

    But I still get this error. And I also wonder that the UC4 error says 'HTTP 400' since the git connection only should be established via ssh.

    One thing i've seen is: If I use ssh://git@... as the repo Url I can see this in the server trace.
    Caused by: org.eclipse.jgit.errors.NotSupportedException: URI not supported: ssh:///git@git.core.xxxxxxx:user/xxx_uc4.git​

    But if I use git@... I do not see anything in any log file(s)


    Best regards, -chris


  • 4.  RE: Problem configuring git version control (gitlab)

    Posted Aug 22, 2022 09:57 AM
    You definitely want it in this format:
    git@git.core.xxxxxxx:user/xxx_uc4.git​​

    I myself only had GIT work one time.  I am currently working with support to find out what final piece I'm missing to get it reimplemented for v 21.0.1. I'm getting an permission denied error when attempting to initialize, but it sees the repo and is connecting successfully.

    This is really the least documented feature I've come across.  I believe all the logs should show up under one of the WPs.  Sometimes the AWI log has Automic side feedback if there are errors.




  • 5.  RE: Problem configuring git version control (gitlab)

    Posted Aug 23, 2022 11:16 AM
    Also, the CP is where the log will be for the sync.
    You might have to increase the trace level if there is an error before the output begins.
    TCP/IP set to 2 and Database of 4.


  • 6.  RE: Problem configuring git version control (gitlab)

    Posted Aug 29, 2022 02:14 AM
    Hi Mick,
    nothing I tried so far has unveiled any more enlightning errors.
    Do you know if it's possible to create a local repository and use this instead?

    Best Regards, -chris


  • 7.  RE: Problem configuring git version control (gitlab)

    Posted Aug 29, 2022 09:29 AM
    Chris,

    I'm sure you can, although I have not.
    Also, if your network team doesn't allow traffic to or from gitlab, that could be a hangup.
    Have you verified the user can log on with the SSH key, outside the Automic system?


  • 8.  RE: Problem configuring git version control (gitlab)

    Posted 10 days ago

    Hi Mick,
    yes I checked the acces to the gitlab instance is working. On the machine where UC4 is installed I tested the ssh connection and it worked.
    I also tried a local git repo and added it like "file://c:\Users\Public\my_repo". This time it showed no error when opening the version control tab.
    Let's see if this is a reasonable workaround.

    Thanks for your input.
    Best regards, chris