Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: MDB Angular - Azure Pipelines (Build Server) - How to?

Mac free asked 3 years ago


We have an automated pipeline for building our projects and we need it to be able to retrieve MDB Angular Pro from the MDB source:

npm install git+https://@git.mdbootstrap.com/mdb/angular/mdb5/prd/mdb5-angular-ui-kit-pro-essential

How would we set that up?

When I attempted to use that with my access token on my desktop, it resulted in a credential prompt.

Update

I don't feel like we are getting the support we need on this. This happens before the package.json is updated is the key issue. git version 2.32.0.windows.1

These are the steps to reproduce this:

  1. Create a new Angular 11 project
  2. NPM Install MDB A following the steps here: https://mdbootstrap.com/docs/b5/angular/pro/installation/#section-npm using this command: npm install git+https://ACCESS_TOKEN@git.mdbootstrap.com/mdb/angular/mdb5/prd/mdb5-angular-ui-kit-pro-essential

Expected behavior: The MDBA package installs without further interaction

Actual behavior: We are prompted with a Git Credentials dialog:enter image description here

This occurs reliably on every machine we try, including the build server. It does not happen in the video in the installation instructions. What needs to change so that we can install this without having to manually login?


Mac free commented 3 years ago

Additional notes, we did try to use the access token with our build server (note: it stripped the access token from the error message):

Build Server Error


Arkadiusz Idzikowski staff commented 3 years ago

@Mac Can you provide more details about the problem with credentials? Please take a look at these threads, maybe the problem is similar in your case:

https://mdbootstrap.com/support/angular/mdb-4-angular-pro-installation-issues/

https://mdbootstrap.com/support/angular/mdb-pro-cli-install-login-loop/


Mac free commented 3 years ago

Neither of those apply, we have NPM and Git installed on the build server, it has successfully done thousands of angular builds for the application in question.

I followed the video, and even though I put in the access token I generated, it still prompted me for user name and password. It then succeeded, and embedded the credential in the package.json.

We then pushed the commit, triggered the automated build, and received the error above on the NPM install step.

Our expectation is that the access token allows our automated pipeline the ability to retrieve the package from mdbootstrap without human intervention.


Arkadiusz Idzikowski staff commented 3 years ago

@Mac Please edit your first post and provide content of the package.json file so we can check the MDB installation config (please remember to remove the access token).

Which Git version do you use?


Mac free commented 3 years ago

Updated, package.json is after the initial request for credentials, so doesn't seem to matter. We only went that far to see if the build server would respond the same as the desktop, which it did.


Arkadiusz Idzikowski staff commented 3 years ago

@Mac We asked about package.json to make sure if the entry created for mdb-angular-ui-kit is correct in this case.

Please try to add oauth2: before the access token in the installation command and let me know if that helped to resolve the problem:

git+https://oauth2:XXXXXXXXXXX@git.mdbootstrap.com/mdb/angular/mdb5/prd/mdb5-angular-ui-kit-pro-essential.git


Mac free commented 3 years ago

That worked, looks like the oauth2: is missing from the documentation!

Thanks, //mac


Arkadiusz Idzikowski staff commented 3 years ago

@Mac Glad it works, we updated the installation page.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: MDB5 1.0.0-beta5
  • Device: Server
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: Yes