Unable to connect to Git repository -

Solved!
Carl
Level 3
Unable to connect to Git repository -

Hi, 

I need to connect to Git Repository and I'm having this message (screenshot below) when I click in checkout to refresh the branch.

Do we need to have a license to connect a DSS project to a personal Git Repository?  Or am I missing something with this configuration ?

Screenshot 2022-04-10 at 13.28.50.pngScreenshot 2022-04-10 at 13.29.15.png

0 Kudos
1 Solution
sergeyd
Dataiker

Yes, you can use git tokens as well. Just pass them in the URL while configuring remote git. Something like this:

https://<username>:<token>@github.com/<your_git_link>.git

 You can find some online resources as well like this one: 

https://stackoverflow.com/questions/18935539/authenticate-with-github-using-a-token

 

View solution in original post

0 Kudos
3 Replies
sergeyd
Dataiker

Hi @Carl 

Thanks for the screenshots but the error is quite obvious to me. 

The URL you are trying to clone does not match the instance whitelist

just means that the URL that you passing as remote git does not match the regex that is configured in DSS Apps->Settings->GIT. 

The weird thing though is that array (showing the current regex is empty) without even a "" while usually should show the current regex settings: 

Screenshot 2022-04-10 at 15.19.09.png

Please remove any other git integration rules except the default one, remove all additional git config options, make sure that the default regex is used: 

^(?:git|ssh|https?|git@[-\w.]+):(\/\/)?(.*?)(\.git)?(\/?|\#[-\d\w._]+?)$

 

0 Kudos
Carl
Level 3
Author

Now it's working, I did as you suggested, remove any other configuration and add default regex (screenshoot below)Screenshot 2022-04-10 at 14.38.07.png

Here's the result 

Screenshot 2022-04-10 at 14.40.38.png

But when I try to import from my git repository I get following message:

Screenshot 2022-04-10 at 14.44.34.png

Can we configure "Token" with DSS or just available with "ssh" ?

 

 

0 Kudos
sergeyd
Dataiker

Yes, you can use git tokens as well. Just pass them in the URL while configuring remote git. Something like this:

https://<username>:<token>@github.com/<your_git_link>.git

 You can find some online resources as well like this one: 

https://stackoverflow.com/questions/18935539/authenticate-with-github-using-a-token

 

0 Kudos