相关疑难解决方法(0)

如何使用私有Github repo作为npm依赖

如何列出一个私人Github上回购为"dependency"package.json?我尝试了npm的Github URL语法ryanve/example,但是npm install在package文件夹中进行了私有依赖项的"无法安装"错误.是否有一个特殊的语法(或其他机制)依赖私人回购?

git github node.js npm package.json

178
推荐指数
6
解决办法
8万
查看次数

为github私人仓库获取"终端提示禁用"错误的结果

我使用浏览器中的Github UI创建了私有repo examplesite/myprivaterepo.

然后我去了我的go目录(在桌面上)并克隆了它:

$ cd $GOPATH
$ go get github.com/examplesite/myprivaterepo
Run Code Online (Sandbox Code Playgroud)

到现在为止还挺好.创建文件scheduler.go,添加到repo,然后推送.

$ vim scheduler.go
$ git add scheduler.go
$ git commit
$ git push
Run Code Online (Sandbox Code Playgroud)

Everythng没关系.但当我去一台干净的笔记本电脑并试图克隆回购时,我收到一个错误:

# Now on laptop, which doesn't yet know about the repo
$ cd $GOPATH
$ go get github.com/examplesite/myprivaterepo
# At this point it should ask for my user ID and password ,right? But it doesn't.
# Instead, this error occurs:
cd .; git clone https://github.com/examplesite/myprivaterepo /Users/tom/go/src/github.com/examplesite/myprivaterepo
Cloning into '/Users/tom/go/src/github.com/examplesite/myprivaterepo'...
fatal: could not read Username …
Run Code Online (Sandbox Code Playgroud)

git go

152
推荐指数
10
解决办法
13万
查看次数

标签 统计

git ×2

github ×1

go ×1

node.js ×1

npm ×1

package.json ×1