This question is too broad. Needs more details to clarify.
Run git remote show -n origin
(Assuming you are on branch origin
. -n
flag means "do not query remotes", which reduce the operating time for web requests.), you may see the remote URL.
In many common cases, for example on GitHub, Git URLs are in HTTPS protocols
https://github.com/<user>/<repo>.git
or SSH protocols
git@github.com:<user>/<repo>.git
If the field user
is not you, or one of your organizations, then you seems trying to contribute to someone's repository. Please fork and create a pull request to do so. You may need to change your local repo's remote url with command
git remote set-url <branch> <newurl>
If user
is you, then check if you have input your token correctly.
- If you are using HTTPS protocol, check the username and password you input. You may need to check Git Credentials.
- If you are using SSH protocol, make sure you have the corresponding SSH key from your computer to GitHub. You may test the connection with command
ssh -T git@github.com
.
Update 1: There seems a typo in your question, git@github.com:/username/repository_name
. Note the first slash. I am not sure if it troubles.
Update 2: Check your Git credentials save in your IntelliJ IDEA in File -> Settings -> Version Control -> GitHub
Update 3: You are able to share it to GitLab too, just add one remote, for example run command git remote add gitlab <url>
.