Changing a remote's URL

参考: https://help.github.com/articles/changing-a-remote-s-url/
The git remote set-url command changes an existing remote repository URL.

The git remote set-url command takes two arguments:
An existing remote name. For example, origin or upstream are two common choices.
A new URL for the remote.

List your existing remotes in order to get the name of the remote you want to change.

git remote -v
origin [email protected]:USERNAME/REPOSITORY.git (fetch)
origin [email protected]:USERNAME/REPOSITORY.git (push)
Change your remote‘s URL from SSH to HTTPS with the git remote set-url command.

git remote set-url origin https://github.com/USERNAME/OTHERREPOSITORY.git
Verify that the remote URL has changed.

git remote -v
# Verify new remote URL
origin https://github.com/USERNAME/OTHERREPOSITORY.git (fetch)
origin https://github.com/USERNAME/OTHERREPOSITORY.git (push)

Changing a remote's URL

时间: 2024-11-02 12:54:18

Changing a remote's URL的相关文章

Command failed: git -c core.longpaths=true config --get remote.origin.url

「Unable to Connect to GitHub.com For Cloning」Error: Command failed: git -c core.longpaths=true config --get remote.origin.url此处原因应该是因为网络无法透过git://方式将package download下来清除缓存:npm cache clear更改Download方式:git config --global url."https://".insteadOf

git url ssh和https相互切换

Changing a remote's URL The git remote set-url command changes an existing remote repository URL. Tip: For information on the difference between HTTPS and SSH URLs, see "Which remote URL should I use?" The git remote set-url command takes two ar

Generating SSH keys

Generating SSH keys MAC WINDOWS LINUX ALL SSH keys are a way to identify trusted computers, without involving passwords. The steps below will walk you through generating an SSH key and adding the public key to your GitHub account. We recommend that y

【ASK】git使用中出现Permission denied (publickey).

好久没有用git了,今天突然执行了一下 $git submodule update --init --recursive =============================== 结果出现如下提示 Cloning into 'Submodules/********'... Permission denied (publickey). =============================== 由于确实好长时间没有摸过git了,一点印象都没有了.没办法,只能google了,还好一搜就得到

NodeJS+Express+MySQL开发小记(2):服务器部署

http://borninsummer.com/2015/06/17/notes-on-developing-nodejs-webapp/ NodeJS+Express+MySQL开发小记(1)里讲过在本地搭建 NodeJS 网站的若干细节.本人最近在阿里云服务器上面按最低配租了4个月的云服务器,所以想试着把这个项目部署到云上.云服务器操作系统是Ubuntu 14.04 LTS.之前一直在Windows下做开发,对于Linux下的环境搭建.配置还不是很熟悉,搭建的过程中学到很多东西. 本文简单记

github 铺设403错误的处理

如果没有什么别的问题的话,推荐使用SSH的方式.请参考:http://stackoverflow.com/questions/7438313/pushing-to-git-returning-error-code-403-fatal-http-request-failed Pushing to Git returning Error Code 403 fatal: HTTP request failed up vote241down votefavorite 119 I was able to

Win7下生成SSH Key连接Github--(MsysGit)

ls -al ~/.ssh # Lists the files in your .ssh directory, if they exist We strongly recommend using an SSH connection when interacting with GitHub. SSH keys are a way to identify trusted computers, without involving passwords. The steps below will walk

Github 之 SSH key的创建于配置(Windows)

最近配置了github的ssh key,翻找了大量资料后发现github官方就有相关的教程--在此翻译一下官方教程以加深印象 原文链接:https://help.github.com/categories/ssh/ Generating an SSH key(生成SSH key) SSH密钥是来识别值得信赖的电脑的方法.您可以生成一个SSH密钥,并按照本节所述的方法将公共密钥添加到您的帐户GitHub中. Checking for existing SSH keys(检查已存在的SSH key)

[Git] git remote

命令 git remote 语法 git remote [-v | --verbose] git remote add [-t <branch>] [-m <master>] [-f] [--[no-]tags] [--mirror=<fetch|push>] <name> <url> git remote rename <old> <new> git remote remove <name> git remo