Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not determine ref type of version: remote: Repository not found (private github repository during "setup_upstream_workspace" step) #786

Closed
Minipada opened this issue Jul 4, 2022 · 13 comments

Comments

@Minipada
Copy link

Minipada commented Jul 4, 2022

Hi,
I am basing my Github actions CI with a private container image which contains a .netrc file allowing me to git clone using https. I am using a github hosted runner.

So if i enter my container and execute

git clone https://github.com/ORG/REPO

It will work. But when running from the CI, I get this:
image

I also tried to enable netrc from outside the container without success.
I'm not sure where to continue from that.

Thanks

@mathias-luedtke
Copy link
Member

How are you configuring UPSTREAM_WORKSPACE? It looks like you are not setting the version..

@Minipada
Copy link
Author

Minipada commented Jul 4, 2022

I have a string defined: packages.repos. The version is set in the .repos

@mathias-luedtke
Copy link
Member

It looks like you are not setting the version..

No, it just cannot connect.to the remote.

Have you setup a PAT?
See #574 (comment)

@mathias-luedtke
Copy link
Member

which contains a .netrc

I guess that this contains you PAT..
Where did you put it?

@Minipada
Copy link
Author

Minipada commented Jul 4, 2022

I just tried passing it like in the comment you mentioned and it does not make a difference. My current token is stored in ~/.netrc:

machine github.com login USER password ghp_...

full path is /root/.netrc.
Is industrial ci running as root? Could be the issue because would be the wrong location. If it's the docker image default user, then it should find it

@mathias-luedtke
Copy link
Member

mathias-luedtke commented Jul 4, 2022

If it's the docker image default user, then it should find it

Yes, the default user.
But I am not sure, if I have ever tested it with a non-root user.

Does is work locally with vcs and that .netrc?

@mathias-luedtke
Copy link
Member

mathias-luedtke commented Jul 4, 2022

Since you already have a custom docker image, you could try ISOLATION: shell as well.

 isolated:
    env:
      ISOLATION: shell
      ROS_DISTRO:  <YOUR ROSDISTRO>
    runs-on: <YOUR DOCKER IMAGE>
    steps:
      - uses: actions/checkout@v1
      - uses: 'ros-industrial/industrial_ci@master'

@Minipada
Copy link
Author

Minipada commented Jul 4, 2022

Does is work locally with vcs and that .netrc?

Yes

@Minipada
Copy link
Author

Minipada commented Jul 4, 2022

With ISOLATION: shell, i"m getting the same error. It fails on the private repo

@mathias-luedtke
Copy link
Member

mathias-luedtke commented Jul 4, 2022

Hmm, tricky.

Please run a bash in your docker image and try vcs import manually.
If this works, clone industrial_ci and your repo, export ISOLATION=shell and run ci.sh directly from your repo folder.

@Minipada
Copy link
Author

Minipada commented Jul 4, 2022

I can't run ISOLATION=shell on my pc, i'm on arch... so there is no apt etc...
Otherwise, without it, it runs properly

@Minipada
Copy link
Author

Minipada commented Jul 4, 2022

A colleague tried on his Ubuntu 20. With ISOLATION=shell and CI=true and it worked.
I'm lost on this one

@Minipada
Copy link
Author

Minipada commented Jul 4, 2022

Ok, we solved it. The error was on my side...
There was a step changing some permissions in the action that somehow only triggered issue when fetching private repos.

Sorry for the trouble and thanks for the support

@Minipada Minipada closed this as completed Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants