> For the complete documentation index, see [llms.txt](https://docs.oceanprotocol.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.oceanprotocol.com/user-guides/asset-hosting/github.md).

# Github

How to use Github for your NFT assets

### **Github**

GitHub can be used to host and share files. This allows you to easily share and collaborate on files, track changes using commits, and keep a history of updates. GitHub's hosting capabilities enable you make your content accessible on the web.

### **Prerequisites**

Create an account on [Github](https://github.com/). Users might also be asked to provide details and billing addresses that are outside of this tutorial's scope.

**Step 1 - Create a new repository on GitHub or navigate to an existing repository where you want to host your files.**

<figure><img src="https://932814818-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzQlpIJEeu8x5yl0OLuXn%2Fuploads%2Fgit-blob-6ba9d12e98df45a174665b8f29b6f067909367bb%2FScreenshot%202023-06-16%20at%2007.58.20.png?alt=media" alt=""><figcaption><p>Create new repository</p></figcaption></figure>

Fill in the repository details. **Make sure your Repo is public.**

<figure><img src="https://932814818-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzQlpIJEeu8x5yl0OLuXn%2Fuploads%2Fgit-blob-f22154693e4e03f1f718f69ae075ca1deaee4cd9%2FScreenshot%202023-06-16%20at%2007.59.38.png?alt=media" alt=""><figcaption><p>Make the repository public</p></figcaption></figure>

### Host Your File

**Step 2 - Upload a file**

Go to your repo in Github and above the list of files, select the Add file dropdown menu and click Upload files. Alternatively, you can use version control to push your file to the repo.

<figure><img src="https://932814818-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzQlpIJEeu8x5yl0OLuXn%2Fuploads%2Fgit-blob-e42698b78d38887caa15aaa7d9790186713ce7d0%2FScreenshot%202023-06-16%20at%2007.50.27.png?alt=media" alt=""><figcaption><p>Upload file on Github</p></figcaption></figure>

To select the files you want to upload, drag and drop the file or folder, or click 'choose your files'.

<figure><img src="https://932814818-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzQlpIJEeu8x5yl0OLuXn%2Fuploads%2Fgit-blob-6feb1f774fd69879af594f8cc379b21b026a6649%2FScreenshot%202023-06-16%20at%2007.51.14.png?alt=media" alt=""><figcaption><p>Drag and drop new files on your GitHub repo</p></figcaption></figure>

In the "Commit message" field, type a short, meaningful commit message that describes the change you made.

<figure><img src="https://932814818-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzQlpIJEeu8x5yl0OLuXn%2Fuploads%2Fgit-blob-fbbeb05a6e94445f5e658edc6a091843ccc13fdd%2FScreenshot%202023-06-16%20at%2007.54.29.png?alt=media" alt=""><figcaption><p>Commit changes</p></figcaption></figure>

Below the commit message field, decide whether to add your commit to the current branch or to a new branch. If your current branch is the default branch, then you should choose to create a new branch for your commit and then create a pull request.

After you make your commit (and merge your pull request, if applicable), then click on the file.

<figure><img src="https://932814818-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzQlpIJEeu8x5yl0OLuXn%2Fuploads%2Fgit-blob-7c7b728c26b4a717ec4160db17af5d95f8d0ca14%2FScreenshot%202023-06-16%20at%2007.56.01.png?alt=media" alt=""><figcaption><p>Upload successful</p></figcaption></figure>

**Step 3 - Get the RAW version of your file**

To use your file on the Market **you need to use the raw url of the asset**. Also, make sure your Repo is publicly accessible to allow the market to use that file.

Open the File and click on the "Raw" button on the right side of the page.

<figure><img src="https://932814818-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzQlpIJEeu8x5yl0OLuXn%2Fuploads%2Fgit-blob-bbc86bb30532c45097ff3f3c667cfdb47704586b%2FScreenshot%202023-06-16%20at%2008.02.25.png?alt=media" alt=""><figcaption><p>Click the Raw button</p></figcaption></figure>

Copy the link in your browser's URL - it should begin with "<https://raw.githubusercontent.com/>...." like in the image below.

<figure><img src="https://932814818-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzQlpIJEeu8x5yl0OLuXn%2Fuploads%2Fgit-blob-f271309065f1f497335c364e0d0941911354bde1%2FRaw-URL.png?alt=media" alt=""><figcaption><p>Grab the RAW github URL from your browser's URL bar</p></figcaption></figure>

<figure><img src="https://932814818-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzQlpIJEeu8x5yl0OLuXn%2Fuploads%2Fgit-blob-39af555d8428008bda50b4bcb757c0a5ec6e216d%2FScreenshot%202023-06-16%20at%2008.05.41.png?alt=media" alt=""><figcaption><p>Copy paste the raw url</p></figcaption></figure>

**Step 4 - Publish the asset using the Raw link**

Now, copy and paste the Raw Github URL into the File field of the Access page in the Ocean Market.

<figure><img src="https://932814818-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzQlpIJEeu8x5yl0OLuXn%2Fuploads%2Fgit-blob-b2545bba5c034ee29d5fa30b6484d096a5ca1236%2FScreenshot%202023-06-16%20at%2008.08.12.png?alt=media" alt=""><figcaption><p>Upload on the Ocean Market</p></figcaption></figure>

Et voilà! You have now successfully hosted your asset on Github and properly linked it on the Ocean Market.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.oceanprotocol.com/user-guides/asset-hosting/github.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
