美文网首页
Android Studio 将项目添加到 Bitbucket

Android Studio 将项目添加到 Bitbucket

作者: 小耗子_20da | 来源:发表于2022-06-02 18:09 被阅读0次

1、在Bitbucket 创建项目和仓库

创建项目

2、在Bitbucket 设置用户访问权限

如果没有权限,是无法添加Url的


设置权限

3、在Android Studio 上添加远程仓库Url

android studio 工具栏 Git -> Manager Remotes...


添加远程仓库

url可在Bitbucket对应项目复制,粘贴进来后需要在url中拼接账号密码,否则会push失败

如果url是:http://192.168.123.123:8080/scm/test/hello.git
账号是:nihao
密码是:hello
那么最后凭借结果应该是
http://nihao:hello@192.168.123.123:8080/scm/test/hello.git

或者区对应项目的.git/config文件中修改
格式为:url = http://[用户名]:[密码]@192.168.123.123:8080/scm/test/hello.git

[remote "bitbucket"]
    url = http://nihao:hello@192.168.123.123:8080/scm/test/hello.git
    fetch = +refs/heads/*:refs/remotes/bitbucket/*

4、在Android Studio 上push

相关文章

网友评论

      本文标题:Android Studio 将项目添加到 Bitbucket

      本文链接:https://www.haomeiwen.com/subject/pciqmrtx.html