【发布时间】:2018-10-24 15:06:18
【问题描述】:
我正在尝试从 bitbucket 管道提交并推送到 bitbucket 存储库。但是,它是一个私人仓库,那么访问它的最简单方法是什么?
这是我的脚本的样子:
pipelines:
default:
- step:
script: # Modify the commands below to build your repository.
- VERSION=$(<version.txt)
- echo $VERSION 0.1 | awk '{print $1 + $2}' > version.txt
- echo $(<version.txt)
- git config --global push.default simple
- git remote set-url origin https://myname@bitbucket.org/company/repo.git
- git config user.name "myname"
- git config user.email "myname@company.com"
- git add version.txt
- git commit -m "[skip CI]"
- git push
- echo "New version = $VERSION"
它卡在 push 命令并返回:
fatal: could not read Password for 'https://myname@bitbucket.org': No such device or address
我如何设置我的密码,或者有没有没有密码的方法?让它以某种方式意识到它已经在回购本身中。我阅读了有关 SSH 密钥的信息,但对这个概念以及如何使用它们不是很熟悉。
【问题讨论】:
标签: git bitbucket push bitbucket-pipelines