---
title: Authentication options using a Repo URL
description: In some cases it is required to authenticate when accessing a repo by URL.  This article explains how to use username:password and Personal Access Tokens (PAT)
---

[Skip to content](https://help.copia.io/knowledge/authentication-options-using-a-repo-url#main-content)

English

Show submenu for translations

[More support](https://help.copia.io/knowledge/kb-tickets/new?hsLang=en)

![](https://help.copia.io/hubfs/Logo_Hotdog_BlackWhite%20(1).svg)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [More support](https://help.copia.io/knowledge/kb-tickets/new)
- Contact us

 Contact us

 How can we help you?

- There are no suggestions because the search field is empty.

1. [Copia Help Center](https://help.copia.io/knowledge?hsLang=en)
2. [Source Control FAQ](https://help.copia.io/knowledge/source-control-faq?hsLang=en)
3. [Source Control](https://help.copia.io/knowledge/source-control-faq?hsLang=en#source-control)

# Authentication options using a Repo URL

## In some cases it is required to authenticate when accessing a repo by URL. This article explains how to use username:password and Personal Access Tokens (PAT)

Using a plain-text Personal Access Token (PAT) or username:password in a Git repo's URL may be considered unsafe because it can be easily exposed in logs, shared unintentionally, and is vulnerable to interception, compromising the security of your account and repositories. This article is only provided for informational purposes.

When preforming certain operations (*such as cloning a repository via the Git CLI*), authentication may be required.  Typically a username and password can be used, but in some cases (*such as when 2FA is configured*) a Personal Access Token may be required.

### **Username/Password**

When using a username and password, you can configure the URL for your repository as shown below:  
`https://username:password@copia_url/org_name/reponame.git`

*(**NOTE**: In the example above, the "copia\_url" is "app.copia.io", unless you have a self-hosted instance of Copia)* 

### Personal Access Token (PAT)

To use a Personal Access Token, you first need to create one.  Follow these instructions on creating a Personal Access Token: [How do I create an Access Token?](https://help.copia.io/knowledge/how-do-i-create-an-access-token?hsLang=en)

Once created, you can configure the URL for your repository as shown below:

`https://personal_access_token@copia_url/org_name/reponame.git`

*(**NOTE**: In the example above, the "copia\_url" is "app.copia.io", unless you have a self-hosted instance of Copia)* 

#### Accessing a remote repo using a PAT

These are the steps for adding a PAT to a remote repo's URL in your Git client. The steps below describe how to do this for the Copia desktop application. The same approach can be used with other clients such as Git Bash or the Git CLI.

1. Navigate to the repo in the Copia desktop app.
2. In the Menu Bar, click *Repository* \> *Repository Settings*
3. On the *Remote* tab, beneath *Primary remote repository (origin)*, paste in your PAT in the format shown above
4. Click *Save*

- [Getting Started](https://help.copia.io/knowledge/getting-started?hsLang=en#main-content)

    - [Sales Wiki](https://help.copia.io/knowledge/getting-started?hsLang=en#sales-wiki)
    - [Account Management](https://help.copia.io/knowledge/getting-started?hsLang=en#account-management)
    - [Customer Experience](https://help.copia.io/knowledge/getting-started?hsLang=en#customer-experience)
- [Source Control FAQ](https://help.copia.io/knowledge/source-control-faq?hsLang=en#main-content)

    - [Web App](https://help.copia.io/knowledge/source-control-faq?hsLang=en#web-app)
    - [Git Questions](https://help.copia.io/knowledge/source-control-faq?hsLang=en#git-questions)
    - [Desktop App](https://help.copia.io/knowledge/source-control-faq?hsLang=en#desktop-app)
    - [Tutorials](https://help.copia.io/knowledge/source-control-faq?hsLang=en#tutorials)
    - [Best Practices](https://help.copia.io/knowledge/source-control-faq?hsLang=en#best-practices)
    - [Source Control](https://help.copia.io/knowledge/source-control-faq?hsLang=en#source-control)
- [DeviceLink FAQ](https://help.copia.io/knowledge/devicelink-faq?hsLang=en#main-content)

    - [Siemens TIA Portal](https://help.copia.io/knowledge/devicelink-faq?hsLang=en#siemens-tia-portal)
    - [Agent](https://help.copia.io/knowledge/devicelink-faq?hsLang=en#agent)
    - [General](https://help.copia.io/knowledge/devicelink-faq?hsLang=en#general)
    - [Rockwell Studio 5000](https://help.copia.io/knowledge/devicelink-faq?hsLang=en#rockwell-studio-5000)

[![Chill listening crop-3](https://help.copia.io/hs-fs/hubfs/Logo_Hotdog_BlackTeal-1.png?width=87&height=24&name=Logo_Hotdog_BlackTeal-1.png "Chill listening crop-3")](http://copia.io)

43 W 24th St, 6th Floor  
New York, NY 10010

<https://www.facebook.com/> <https://www.twitter.com/> <https://www.instagram.com/> <https://podcasts.apple.com/> [mailto:email@email.com](mailto:email@email.com)

Copyright © 2025, Copia Automation, Inc.