使用gulp-git克隆具有凭据的git repo
Clone a git repo with credentials using gulp-git
我正试图通过gull git从个人服务器克隆一个git repo到"test"文件夹中,它需要用户名和密码。不知道如何传递用户名和密码。请注意,它不是github存储库
gulp.task('clone', function(){
git.clone('http://webrepo/git/mytest.git',{args:'./test'},function(err){
if (err) throw err
});
});
您应该能够在回购URL中指定用户名和密码:
gulp.task('clone', function(){
git.clone('http://username:password@webrepo/git/mytest.git',
{args:'./test'}, function(err) {
if (err) throw err;
});
});
当然,所有关于将明文密码存储在文件中并通过纯HTTP传输的常见注意事项都适用。
相关文章:
- Gulp Git首先运行提交任务,然后运行推送任务
- Git为整个项目提供一个repo(frontend+node.js)
- 从github url中查找用户、repo和路径
- 类似git命令的节点cli参数解析器
- 如何将javascript ES6 repo编译输出导入其他repo
- 使用gulp-git克隆具有凭据的git repo
- eslint在git上预调试
- 设置应用程序.js使用 git bash 错误
- 在 javascript 中将客户端的 Git diff 显示为 html
- 当我的 API 密钥位于 .gitignore 文件中时,如何从 git 部署到 heroku
- 从 git 存储库构建手写笔
- 如何在网络风暴中使用 GIT
- 在使用 Gulp 在 javascript 中声明对象时,在 Git bash 中出现以下错误“语法错误:意外标识符”
- 如何从 git hub引用远程文件路径
- 如何将 URL 的代码推送到 Git 存储库
- 如何将Grunt生成的文件git添加到我的Github存储库中
- Node.js在Windows上的Git Bash shebang失败
- 用于开源版本的Git API
- npm用子模块安装forked-git
- Git远程回购在<ul>