---
title: "How to use Github private Composer package as a local package for Laravel using Composer"
description: "To use your Github private composer package as your local package you need to download it from github or you can clone it using this&hellip;"
canonical: "https://xgenious.com/how-to-use-github-private-composer-package-as-a-local-package-for-laravel-using-composer/"
source_url: "https://xgenious.com/how-to-use-github-private-composer-package-as-a-local-package-for-laravel-using-composer/"
author: "Sharifur Rahman"
published: "2022-11-28T07:53:00+06:00"
modified: "2025-01-19T04:58:33+06:00"
---

# How to use Github private Composer package as a local package for Laravel using Composer

To use your Github private composer package as your local package you need to download it from [github](https://github.com)

![git clone ](https://xgenious.com/wp-content/uploads/2022/12/image-4-1024x261.png)

*clone github repository*

or you can clone it using this command

```
git clone <repository url>
```

if you are trying to use [xgenoius](https://xgenious.com) private package as local repository then you will get the file in

**“@core/vendor/xgenious/packagename”**

![xgenious laravel private package](https://xgenious.com/wp-content/uploads/2022/12/image-5-1024x550.png)

*xgenious private laravel package path*

> you might found only core in our latest project, in older project we used @core

Now make a folder inside**@core or core**folder name it as **packages** and copy package file here

![copy package file to folder](https://xgenious.com/wp-content/uploads/2022/12/image-6.png)

*copy package file to a folder*

if you download from github, you might found tags with the package folder name , rename it with only package name.

go to @core or core > composer.json file open it and remove the vcs package code

![load package from github](https://xgenious.com/wp-content/uploads/2022/12/image-7-1024x490.png)

*load package from github*

add below code to point the local package we copied in your packages folder

![add composer code for load local package](https://xgenious.com/wp-content/uploads/2022/12/image-8-1024x493.png)

*add composer code for load local package*

> if you are using our xgneious script , you need to remove the our private packages first to load it from locally
>
>
>
> composer remove xgenious/paymentgateway then need to change composer.json code to point to local package

![](https://xgenious.com/wp-content/uploads/2022/12/image-9.png)

if you see any it asking for token, hit enter for abort. then follow below part for user it as local package

```
 "repositories": [
        {
            "type": "path",
            "url": "packages/paymentgateway"
        }
    ],
  "require": {
        "php": "^8.0.2",
        "xgenious/paymentgateway": "dev-master"
    },
```

now run [composer](https://getcomposer.org/) require command the package

```
composer require xgenious/paymentgateway
```

that’s all now it should work fine with your composer local package, you can us any other package with the script now./
