## Apr, 2022 Update:
You can **clone a private repository from your account** and you can also **clone a private repository from organization** if you're **its owner or member**.
This is the syntax of the command to **clone a private repository from your account or organization** as shown below:
*_**pat** is **PAT(Personal Access Token)**._
```
git clone https://<pat>@github.com/<your account or organization>/<repo>.git
```
_**To clone a private repository from your account or organization, you must generate a PAT(Personal Access Token) on your account, Github and add it to the command above. *Organization doesn't have PAT generator.**_
**1,** Go to **"Settings" in your account**:
[](https://i.stack.imgur.com/3VrIs.png)
**2,** Scroll down then go to **"Developer settings"**:
[](https://i.stack.imgur.com/uDsJm.png)
**3,** Press **"Personal access tokens"** then press **"Generate new token"**:
[](https://i.stack.imgur.com/QtFtT.png)
**4,** Fill **"Note"** then check **"repo"**:
*_If **"repo"** is not checked, you cannot clone a private repository._
[](https://i.stack.imgur.com/v6FT6.png)
**5,** Scroll down then press **"Generate token"**:
[](https://i.stack.imgur.com/Nxmr0.png)
**6,** Finally, **a PAT** is generated:
[](https://i.stack.imgur.com/9XEDY.png)
This is the command with **the PAT generated above**:
```
git clone https://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@github.com/<your account or organization>/<repo>.git
```
## Apr, 2022 Update:
You can **clone a private repository from your account** and you can also **clone a private repository from organization** if you're **its owner or member**.
This is the syntax of the command to **clone a private repository from your account or organization** as shown below:
*_**pat** is **PAT(Personal Access Token)**._
```
git clone https://<pat>@github.com/<your account or organization>/<repo>.git
```
_**To clone a private repository from your account or organization, you should generate a PAT(Personal Access Token) on your account, Github and add it to the command above. *Organization doesn't support PAT(Personal Access Token) generator.**_
**1,** Go to **"Settings" in your account**:
[](https://i.stack.imgur.com/3VrIs.png)
**2,** Scroll down then go to **"Developer settings"**:
[](https://i.stack.imgur.com/uDsJm.png)
**3,** Press **"Personal access tokens"** then press **"Generate new token"**:
[](https://i.stack.imgur.com/QtFtT.png)
**4,** Fill **"Note"** then check **"repo"**:
*_If **"repo"** is not checked, you cannot clone a private repository._
[](https://i.stack.imgur.com/v6FT6.png)
**5,** Scroll down then press **"Generate token"**:
[](https://i.stack.imgur.com/Nxmr0.png)
**6,** Finally, **a PAT** is generated:
[](https://i.stack.imgur.com/9XEDY.png)
This is the command with **the PAT generated above**:
```
git clone https://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@github.com/<your account or organization>/<repo>.git
```