Skip to content

Install private repo#123

Open
thibaultzanini wants to merge 7 commits into
montagestudio:masterfrom
thibaultzanini:private-repo-fix
Open

Install private repo#123
thibaultzanini wants to merge 7 commits into
montagestudio:masterfrom
thibaultzanini:private-repo-fix

Conversation

@thibaultzanini

Copy link
Copy Markdown
Contributor

Add a way to install private repositories, but it will only support github.com urls.
Add some functions for checking giturls and add some specs related to them.

@mczepiel

mczepiel commented Apr 1, 2014

Copy link
Copy Markdown

Github advertises: git@github.com:montagejs/matte.git
We have to first of all manually prepend the missing protocol git://

Anyway:

  1. Open packageManager
  2. Manually add dependency git://git@github.com:montagejs/matte.git
  3. Notice that matte is recognized and pending installation
  4. Save
  5. error cloning, package.json saved though (that's fine)
  6. trying to fix the dependencies still doesn't work

Container logs

1 Apr 05:59:39 - [exec] - 87 git 'clone' 'https://SCRUBBED:x-oauth-basic@github.com/:montagejs/matte.git' '/home/montage/workspace/node_modules/matte' # in /
1 Apr 05:59:40 - [exec] - 87 stderr *error: The requested URL returned error: 403 while accessing https://SCRUBBED:x-oauth-basic@github.com/:montagejs/matte.git/info/refs
            fatal: HTTP request failed*
1 Apr 05:59:40 - [container-chain] - 172.17.42.1:33227 -->     POST /api/save HTTP/1.1
1 Apr 05:59:40 - [project-workspace] - save file: /home/montage/workspace//package.json
1 Apr 05:59:40 - [container-chain] - 172.17.42.1:33227 <== 200 POST /api/save HTTP/1.1 -
1 Apr 05:59:41 - [container-chain] - 172.17.42.1:33231 -->     POST /api/flush HTTP/1.1

The clone URL did not work.

@Stuk

Stuk commented Apr 1, 2014

Copy link
Copy Markdown

(Glad to see the scrubbed logs coming in use :))

@Stuk

Stuk commented Apr 1, 2014

Copy link
Copy Markdown

@declarativ-bot test this

@thibaultzanini

Copy link
Copy Markdown
Contributor Author

@declarativ-bot test this

@thibaultzanini

Copy link
Copy Markdown
Contributor Author

@mczepiel Sorry, I think that I broke it with my last commit, but it should be good know.

By the way, I also updated filament in order to ease the user experience with the overlay that allows us to install a new dependency, let me know what you think about it.
montagestudio/filament#250

@Stuk could we use the option --recurse-submodules for the clone function, in order to clone the eventual submodules as well ?
https://github.com/declarativ/firefly/blob/master/container/git.js#L142

ex: https://github.com/KhronosGroup/glTF/tree/master/converter/COLLADA2GLTF/dependencies

@Stuk

Stuk commented Apr 2, 2014

Copy link
Copy Markdown

yeah, that option makes sense. How would keeping the submodules up to date work? How does npm do it (if they actually do anything)?

@mczepiel

Copy link
Copy Markdown

Ok trying to bring this one back into the spotlight.

  1. Add a dependency for the following: git@github.com:declarativ/palette.git
  2. This ends up being written into the package.json: "palette": "git+https://github.com/declarativ/palette.git"

@mczepiel

Copy link
Copy Markdown

Oh and also apparently npm will treat foo/bar as git@github.foo/bar.git Yet another wrinkle

@thibaultzanini

Copy link
Copy Markdown
Contributor Author

If I remember well, the Package Manager will fix every urls to respect the format git+https://

@mczepiel

Copy link
Copy Markdown

I thought we were just doing that internally when we needed to actually fetch the dependency, but the content should go into the file as the user expects. We have to assume they'll be using this package outside of montage studio as well.

@thibaultzanini

Copy link
Copy Markdown
Contributor Author

I think that I wanted to simply the work for the user, for example if an user write that: https://github.com/com:username/package.git or git@github.com:username/package.git...
The PackageManager should be able to fix the missing protocol when it's a github url, but given that it will transform it anyway to a git+https url, I guess it will save this one.

Yeah, It should save what an user write, I'll fix that as soon as possible. (I think I just need a few minutes to fix that)

@mczepiel

Copy link
Copy Markdown

Well the latter example is a valid entry into the package.json, no need to muck with it. For the former you will need to transform it for writing into the package.json, likely if somebody has pasted that http+git is good enough.

But yeah, regardless we should try to preserve the string as authored.

Bigger problem was that palette didn't get installed for me.

@cdebost cdebost self-assigned this Aug 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants