0

I am trying to create a Server for Bower (using private-bower from node js). I think, the problem is coming from the authentication on TFS (https://tfs.companyname.yyy/tfs/xxxxx). This server has for authentication basic auth.

Here is what I understood with the internet.

  • Create a git repo with your source files.
  • Push it to the server.
  • Create a .bowerrc => {"registry": "http://serverName:port"} (I am using localhost at the moment)
  • Execute the command to register your credential in git (also weird for me now) : git ls-remote --tags --heads "https:// tfs.companyname.yyy/tfs/xxx"
  • Execute the command "bower register package-name-here "git+https:// tfs.companyname.yyy/tfs/xxx"

I am stuck here without understanding the problem. The error is:

bower package-name-here#* resolve https:// tfs.companyname.yyy/tfs/xxx#*

bower package-name-here#* ECMDERR Failed to execute "git ls-remote --tags --heads https:// tfs.companyname.yyy/tfs/xxx", exit code of #128 bash: /dev/tty: No such device or address error: failed to execute prompt script (exit code 1) fatal: could not read Username for 'https:// tfs.companyname.yyy': Invalid argument

Additional error details: bash: /dev/tty: No such device or address error: failed to execute prompt script (exit code 1) fatal: could not read Username for 'https:// tfs.companyname.yyy': Invalid argument

bahrep
  • 29,961
  • 12
  • 103
  • 150
Lenny32
  • 624
  • 6
  • 15

2 Answers2

0

If you are using hosted TFS (VSTS), the URL should be like: https://example.visualstudio.com/_git/Repo_Name

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39
  • It is a self-hosted TFS, and the url is not the problem I think. Visual studio must have a hard coded url in the tooling for the bower server. as it is not using the one from the .bowerrc file. – Lenny32 Jun 08 '16 at 10:46
0

I managed to understand some problems by developing a micro bower server with 2 features (search and find the package).

Visual Studio 2015 is always displaying the official result (bower.herokuapp.com) in the GUI.

My .bowerrc (I think it has to be open as Bower do not support credentials)

  "registry": {
      "search": [
                   "http://bower.herokuapp.com",
                   "http://localhost:65200/"
      ]
  }

To add just modify the bower.json and to uninstall I didn't find a user friendly way so Right Click => Remove and remove it from the bower.json

Lenny32
  • 624
  • 6
  • 15