Closed lucaferranti closed 1 year ago
can this failure be related to the lack of tag release on the package repo (see also #62 ) ?
ok my diagnosis was wrong, changing to https gives
Making the modules...
make[2]: Nothing to be done for 'default'.
cd tools/mason && make && make install
Building Mason...
make[1]: Nothing to be done for 'install'.
package detected from git diff: Bricks/ForwardModeAD/0.1.0.toml
package path: Bricks/ForwardModeAD/0.1.0.toml.end
0.1.0.toml
Cloning into 'newPackage'...
fatal: protocol ' https' is not supported
./util/runMasonCI.bash: line 46: cd: newPackage: No such file or directory
package detected from git diff: Bricks/ForwardModeAD/0.1.0.toml
package path: Bricks/ForwardModeAD/0.1.0.toml.end
is this right?
I tried to reproduce the steps locally with the following simplified bash script
#!/usr/bin/env bash
package=$(git diff --name-only HEAD HEAD~1)
end=".end"
path="$package$end"
cd "$(dirname "$path")" || exit 1
echo "package detected from git diff: ${package}"
echo "package path: ${path}"
FILE=$package
basename "$FILE"
f="$(basename -- "$FILE")"
source="$(grep source "$f" | cut -d= -f2)"
echo $source
fixed=$(echo "$source" | tr -d '"')
echo $fixed
basically, I just print the value of source
and fixed
for debugging and when running it I get
package detected from git diff: Bricks/ForwardModeAD/0.1.0.toml
package path: Bricks/ForwardModeAD/0.1.0.toml.end
0.1.0.toml
"git@github.com:lucaferranti/ForwardModeAD.git"
git@github.com:lucaferranti/ForwardModeAD.git
Cloning into 'newPackage'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
./test.bash: line 20: cd: newPackage: No such file or directory
so the source seems indeed correct 🤔.
Furthermore, manually doing git clone git@github.com:lucaferranti/ForwardModeAD.git newPackage
works. So the authentication issue arises when trying to clone from a bash script.
I think this stack overflow question is relevant to understand the issue. If I read it correctly, there are two options
comments?
A few questions
mason publish
? (see also #62 )X.Y.Z
, then it looks for a tagvX.Y.Z
from the given repository?mason publish
?