Bloom-release: Cannot push to remote release repository. fatal: The current branch master has no upstream branch.
Hello community,
I want to release a repository using bloom (first time) and I am following ROS2's official documentation: https://docs.ros.org/en/humble/How-To...
What I have done so far:
- Installed the tools required (python3-bloom python3-catkin-pkg)
- Created a release team
- Created a release repository
- Create a GIT access token to authenticate
- Created a 'bloom' file to use the GIT access token
- Create a ros/rosdistro source entry
- Generated a Changelog
- Bumped the package version using catkin_prepare_release
Then I executed:
bloom-release --new-track --rosdistro humble --track humble wall_follower_ros2
Which asked me to enter a release repository URL, which I did entering: https://github.com/ros2-gbp/wall_follower_ros2-release.git
And then I get prompt to enter the repository name, the repo URL, VSC type, among others (you can see values entered below).
My problem is that I get this error:
==> git push --dry-run
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin master
Cannot push to remote release repository.
Hint: If you just typed in your username/password and you have two-factor authentication,see:
http://wiki.ros.org/bloom/Tutorials/GithubManualAuthorization
My guess is that this is related to the fact that locally I am on branch main
and I don't have a master
branch.
Output of git branch
is:
*main
Output of git remote -v
is:
origin https://github.com/rfzeg/wall_follower_ros2.git (fetch)
origin https://github.com/rfzeg/wall_follower_ros2.git (push)
I Googled it and I found this question that says regarding having having main as branch :
works OK for regular releases (as master will just be another branch to git and Github, and Bloom is able to find everything it needs just fine)
But I doesn't seem to work for me. What is it that I am doing wrong?
I really appreciate any help you can provide.
Roberto
Here are the lines of output of 'bloom-release` :
Release repository url [press enter to abort]: https://github.com/ros2-gbp/wall_follower_ros2-release.git
==> Fetching 'wall_follower_ros2' repository from 'https://github.com/ros2-gbp/wall_follower_ros2-release.git'
Cloning into '/tmp/tmp72wn05ft'...
warning: You appear to have cloned an empty repository.
WARNING [vcstools] Command failed: 'git checkout master'
run at: '/tmp/tmp72wn05ft'
errcode: 1:
error: pathspec 'master' did not match any file(s) known to git
[/vcstools]
Creating 'master' branch.
Creating track 'humble'...
Repository Name:
<name>
Name of the repository (used in the archive name)
upstream
Default value, leave this as upstream if you are unsure
['upstream']: wall_follower_ros2
Upstream Repository URI:
<uri>
Any valid URI. This variable can be templated, for example an svn url
can be templated as such: "https://svn.foo.com/foo/tags/foo-:{version}"
where the :{version} token will be replaced with the version for this release.
[None]: https://github.com/rfzeg/wall_follower_ros2
Upstream VCS Type:
git
Upstream URI is a git repository
hg
Upstream URI is a hg repository
svn
Upstream URI is a svn repository
tar
Upstream URI is a tarball ...