homebridge / docker-homebridge

Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
https://hub.docker.com/r/homebridge/homebridge/
GNU General Public License v3.0
2.57k stars 240 forks source link

package.json with a GitHub URL #483

Closed JonMR closed 1 year ago

JonMR commented 1 year ago

Describe The Bug

I have a fork of a plugin that I haven't published to NPM. My package.json contains a dependency like this

    "homebridge-samsung-tizen": "github:JonMR/homebridge-samsung-tizen#debugging"

when I start the container, I get an error that says

npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/JonMR/homebridge-samsung-tizen.git
npm ERR! No user exists for uid 1001
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/homebridge/.npm/_logs/2022-12-02T21_18_06_064Z-debug-0.log

I played around and created a new image that adds a user with id/gid 1001 just to see what would happen. I got this log over and over. Looking at the log now, maybe I just need to set a passed for the user I added?

Starting dbus-daemon
dbus[102]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

Further playing around, I switched my package.json to use git+https:github.com/JonMR/homebridge-samsung-tizen.git#debugging for the dependency shown above. I then got this interesting error.

npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects clone -b debugging https://github.com/JonMR/homebridge-samsung-tizen.git /home/homebridge/.npm/_cacache/tmp/git-clonelSy1ds --recurse-submodules --depth=1
npm ERR! fatal: destination path '/home/homebridge/.npm/_cacache/tmp/git-clonelSy1ds' already exists and is not an empty directory.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/homebridge/.npm/_logs/2022-12-02T21_52_30_319Z-debug-0.log

Interestingly enough, I couldn't find that directory. I assume that means it's a permissions issue.

Can anything be done to fix the issue? Was I on the right track? This configuration worked on an older image. I assume it was prior to the PUID / PGID change, but haven't verified if that's where it breaks.

Docker Config

`docker run   --net=host   --name=homebridge   -e TZ=America/Detroit   -v /home/jon/.homebridge:/homebridge   oznu/homebridge:latest`

Logs

Shown above inline.

Host Operating System

Raspberry Pi OS - Latest

Host Architecture

armv7l

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.