Coder Social home page Coder Social logo

Comments (22)

vsoch avatar vsoch commented on August 18, 2024

I’m busy this weekend but if you can get me a credential to a testing repo I can look into this for you. Generally I would suggest subclassing the provider.Registry directly and very specifically providing the layers/media types but that’s just my preference. There are examples for how to do this in the documentation.

from oras-py.

alishah730 avatar alishah730 commented on August 18, 2024

indeed I tried with custom layer as well with the example getting same. You can create a demo Harbor account. Or I can invite to the project. Please let me know

from oras-py.

vsoch avatar vsoch commented on August 18, 2024

If you invite me would I still need to make the account? πŸ€”

from oras-py.

alishah730 avatar alishah730 commented on August 18, 2024

image

just need to fill out this form for demo [https://demo.goharbor.io/](https://demo.goharbor.io/) , no email verification is required.

from oras-py.

alishah730 avatar alishah730 commented on August 18, 2024

alishah730/Asdf@1234 please use for testing

from oras-py.

vsoch avatar vsoch commented on August 18, 2024

I tried making an account, the password that I put doesn't work, and it doesn't let me reset or make another one with the same email - I don't think I can help.

from oras-py.

alishah730 avatar alishah730 commented on August 18, 2024

i can login using the creds

client = oras.client.OrasClient(insecure=True)
logged=client.login(username="alishah730",password="Asdf@1234",hostname="demo.goharbor.io")
print(logged)

output :

{'Status': 'Login Succeeded'}

@vsoch

from oras-py.

vsoch avatar vsoch commented on August 18, 2024

The upload URL returns 404, I'm not sure what to say about that.

In [13]: upload_url
Out[13]: 'http://demo.goharbor.io/v2/oras/test/blobs/uploads/'

In [14]: r.json()
Out[14]: 
{'errors': [{'code': 'BLOB_UPLOAD_UNKNOWN',
   'message': 'blob upload unknown to registry'}]}

from oras-py.

vsoch avatar vsoch commented on August 18, 2024

Yes you told me that, I'm not sure how it helps me further debug this. I think it's strange you can't use https

In [23]: r.json()
Out[23]: {'errors': [{'code': 'FORBIDDEN', 'message': 'CSRF token invalid'}]}

If the oras cli works then why not just use it?

from oras-py.

vsoch avatar vsoch commented on August 18, 2024

If you want to help, perhaps you can use the working client in some debug mode to provide the url endpoints that are hit and we can compare side by side.

from oras-py.

alishah730 avatar alishah730 commented on August 18, 2024

Yes you told me that, I'm not sure how it helps me further debug this. I think it's strange you can't use https

In [23]: r.json()
Out[23]: {'errors': [{'code': 'FORBIDDEN', 'message': 'CSRF token invalid'}]}

If the oras cli works then why not just use it?

i need to write a script to customize and push 100+ artifacts.

from oras-py.

alishah730 avatar alishah730 commented on August 18, 2024

Yes you told me that, I'm not sure how it helps me further debug this. I think it's strange you can't use https

In [23]: r.json()
Out[23]: {'errors': [{'code': 'FORBIDDEN', 'message': 'CSRF token invalid'}]}

If the oras cli works then why not just use it?

oras push demo.goharbor.io/oras/test:latest repo.txt
Uploading fe7d9872a34c repo.txt
Uploaded  fe7d9872a34c repo.txt
Pushed demo.goharbor.io/oras/test:latest
Digest: sha256:a1c6906c2ba07.
```...

from oras-py.

vsoch avatar vsoch commented on August 18, 2024

Do you know if harbor accepts the single put request? It could be that it does not, hence the 404 response.

from oras-py.

alishah730 avatar alishah730 commented on August 18, 2024

Do you know if harbor accepts the single put request? It could be that it does not, hence the 404 response.

not sure, if there is any blob upload API

Harbor API

from oras-py.

vsoch avatar vsoch commented on August 18, 2024

@alishah730 could you please try a pull?

from oras-py.

vsoch avatar vsoch commented on August 18, 2024

@alishah730 I'm testing chunked upload (which is currently disabled) and it's telling me the project does not exist:

Issue retrieving session url: {'errors': [{'code': 'UNAUTHORIZED', 'message': 'project oras not found: project oras not found'}]}

Could you please make it / verity it exists? Some registries I think require the target project to exist before you can push to it.

from oras-py.

alishah730 avatar alishah730 commented on August 18, 2024

@alishah730 I'm testing chunked upload (which is currently disabled) and it's telling me the project does not exist:

Issue retrieving session url: {'errors': [{'code': 'UNAUTHORIZED', 'message': 'project oras not found: project oras not found'}]}

Could you please make it / verity it exists? Some registries I think require the target project to exist before you can push to it.

you can use demo/Asdf@1234 , I have created oras

from oras-py.

vsoch avatar vsoch commented on August 18, 2024

@alishah730 is this the same one as before? demo/Asdf@1234 is the full project name? (sorry not familiar with how Harbor is organized!)

from oras-py.

vsoch avatar vsoch commented on August 18, 2024

@alishah730 please provide a name that doesn't have a @ in it - I don't think that is valid for most registries - it typically is put before a digest at the end.

from oras-py.

alishah730 avatar alishah730 commented on August 18, 2024

@alishah730 please provide a name that doesn't have a @ in it - I don't think that is valid for most registries - it typically is put before a digest at the end.

this is password.

user : demo
password : Asdf@1234
repo : oras
host : demo.goharbor.io

sample docker push

docker push demo.goharbor.io/oras/test:latest

from oras-py.

vsoch avatar vsoch commented on August 18, 2024

oh gotcha I interpreted what you said wrong. I'll try that!

from oras-py.

vsoch avatar vsoch commented on August 18, 2024

okay I keep getting a 404. I don't know why - maybe another one of the oras developers can help. It's usually just me on here so you might have better luck pinging the slack and pointing at this issue.

from oras-py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.