Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
avatar
Contributor

Problem Description

When importing a project on CDSW / CML from a private repository in Gitlab / GitHub using the repository URL over HTTPS, it will fail to be created. Screenshot 2023-02-28 at 5.46.56 PM.png
The URL that is passed here is: 

 

 

https://github.com/garrynv/demo123.git

 

 

Screenshot 2023-02-28 at 5.50.32 PM.png

Since the repository is private, you cannot only pass the URL to import it. GitHub will not be able to authenticate the request and will reject it. In the early days, users used to pass their username and password in the HTTPS URL and it used to work. something like below:

 

 

 

https://username:[email protected]/garrynv/demo123.git

 

 

 

However, due to restrictions on Gitlab / GitHub end, this will not work anymore. Users will have to generate a PAToken and pass the PAToken to access private repositories remotely.

Solution

You can refer to the following documents on how to generate Personal Access Token 

Github: Creating a personal access token

Gitlab: Personal access tokens

Once you generate the Personal access Token, for Github you will need to follow the below format to import the project:

 

 

 

https://<PersonalAccessToken>@github.com/garrynv/demo123.git

 

 

 

For example

Screenshot 2023-02-28 at 5.58.55 PM.png

Project creation will be successful. 
Screenshot 2023-02-28 at 5.56.24 PM.png

For Gitlab the format is slightly different: 

 

 

https://username:<PersonalAccessToken>@gitlab.com/garrynv/demo123.git

 

 

 

Hope this helps 🙂 

2,060 Views