Maven 更换远程仓库地址】的更多相关文章

1.第一种方式,通过setting.xml的方式配置数据源 该文件路径D:\IDE\apache-maven-3.2.3\conf\setting.xml 该文件大部分内容都已经注释,我们需要添加如下内容: <profile> <id>dev</id> <!-- repositories and pluginRepositories here--> <repositories> <repository> <id>nexus…
1. 更改软件仓库指向.在github改了用户名和仓库名称后,仓库地址也相应的发生的变化,这时候就需要更新本地仓库以指向新的远程仓库地址: $git remote set-url origin git@github.com:luckid/luckid_themes.git…
$ git remote  -vorigin  http://192.168.1.100/aaa/Project.git (fetch)origin  http://192.168.1.100/aaaj/Project.git (push) ChenYijun@ChenYijun-PC MINGW64 /e/git/Project (developer)$ git remote set-url origin http://192.168.1.111/bbb/Project.git ChenYij…
通过命令直接修改远程仓库地址 git remote 查看所有远程仓库 git remote xxx 查看指定远程仓库地址 git remote set-url origin 你新的远程仓库地址 先删除在添加你的远程仓库 git remote rm origin git remote add origin 你的新远程仓库地址…
一.删除文件 1.克隆远程仓库到本地库. 例如使用ssh方法: git clone git@github.com:xxx/xxx.git 2.对需要删除的文件.文件夹进行如下操作: git rm test.txt (删除文件) git rm -r test (删除文件夹) 3.提交修改 git commit -m "Delete some files." 4.将修改提交到远程仓库的xxx分支: git push origin xxx 二.删除远程仓库 但不删本地资源 我们在使用idea…
1,当中央仓库无法满足要求时,可能项目需要的构件存在另一个远程仓库中.可以在POM文件中配置该仓库.代码如下: <project> ...... <repositories> <repository> <id>repo-f6</id> <url>http://192.168.1.232:8080/content/groups/public/</url> <releases> <enabled>tru…
一.git仓库迁移 1,从原仓库clone或pull到本地仓库 git clone project_name ​[old_remote_repository_address] 2,​在新的git创建一个新仓库.如果用gitolite搭建的git服务器,那么只需要在配置文件gitolite.conf上添加仓库和用户,然后push到服务器即可. 3,进入clone下来的本地仓库目录,将远程仓库地址修改为新的远程仓库地址 project_name> git remote remove origin p…
以项目test为例: 老地址:http://192.168.1.1:9797/john/test.git 新地址:http://git.xxx.xxx/john/test.git 远程仓库名称: origin 方法一 通过命令直接修改远程地址 进入git_test根目录 git remote 查看所有远程仓库, git remote xxx 查看指定远程仓库地址 git remote set-url origin 新地址 方法二 通过命令先删除再添加远程仓库 进入git_test根目录 git…
Maven添加远程仓库 默认情况下,Maven从Maven中央仓库下载所有依赖关系.但是,有些库丢失在中央存储库,只有在Java.net或JBoss的储存库远程仓库中能找到. 1. Java.net资源库 添加Java.net远程仓库的详细信息在“pom.xml”文件. pom.xml <project ...> <repositories> <repository> <id>java.net</id> <url>https://ma…
原文链接:http://www.cnblogs.com/lazb/articles/5597878.html 问:Coding远程仓库地址变了,本地git仓库地址如何更新为最新地址 git修改远程仓库地址 方法有三种: 1.修改命令 git remote origin set-url [url] 2.先删后加 git remote rm origingit remote add origin [url] 3.直接修改config文件 git 远程仓库管理 要参与任何一个 Git 项目的协作,必须…
查看所有远程仓库地址: git remote -v 更改远程仓库地址: git remote set-url origin newUrl 查看某一个远程仓库地址: git remote get-url origin 增加一个远程仓库地址:git remote add name url 重命名一个远程仓库地址:git remote rename <old> <new> 删除一个远程仓库地址:git remote remove name…
默认情况下,Maven从Maven中央仓库下载所有依赖关系.但是,有些库丢失在中央存储库,只有在Java.net或JBoss的储存库远程仓库中能找到. 1. Java.net资源库 添加Java.net远程仓库的详细信息在“pom.xml”文件. pom.xml <project ...> <repositories> <repository> <id>java.net</id> <url>https://maven.java.net…
如何快速关联/修改Git远程仓库地址?按照如下步骤即可快速实现关联/修改Git远程仓库地址: 删除本地仓库当前关联的无效远程地址,再为本地仓库添加新的远程仓库地址 git remote -v //查看git对应的远程仓库地址 git remote rm origin //删除关联对应的远程仓库地址 git remote -v //查看是否删除成功,如果没有任何返回结果,表示OK git remote add origin https://github.com/developers-youcong…
git切换远程分支: 方法一: git remote set-url origin 你新的远程仓库地址 方法二: git remote rm origin git remote add origin 你的新远程仓库地址 如果不放心是否更改成功,可以查看当前路径下的.git文件夹中的config文件中的url是否更改,或者git remote -v查看origin的地址是否正确即可. 方法三: 直接修改.git下的config文件. 但由于我没注意,远程仓库搭建完成后注册的用户名不是原本的用户名,…
国内最快的maven镜像  阿里云maven镜像 <repositories> <repository> <id>spring-snapshots</id> <url>http://maven.aliyun.com/nexus/content/groups/public</url> </repository> </repositories> 上面的代码时配置每个项目里面的,如果你想要暴力点,那就直接配置在%M2…
<mirror> <id>nexus-aliyun</id> <name>Nexus aliyun</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> 1. 阿里云得远程仓库 <mirror> <id&g…
本地仓库是远程仓库的一个缓冲和子集,当你构建Maven项目的时候,首先会从本地仓库查找资源,如果没有,那么Maven会从远程仓库下载到你本地仓库.这样在你下次使用的时候就不需要从远程下载了.如果你所需要的jar包版本在本地仓库没有,而且也不存在于远程仓库,Maven在构建的时候会报错,这种情况可能是有些jar包的新版本没有在Maven仓库中及时更新. (感觉和网络里面的路由器有点像,你发请求,先在路由器缓存中找,若有就返回:没有,再去服务器下载新的再返回给用户的同时更新路由器本地缓存.) 默认仓…
最近要用到一个包:spark-1.6.0-cdh5.8.2,在https://mvnrepository.com网站上搜到该包的pom.xml语句.但是看到下面有这样一句话: 该包在图中所述repository中.因此要添加该repository到mvn远程数据仓库,才能获取到该依赖包. 下面给出添加远程仓库的方法: 在maven 的conf/settings.xml文件下,找到<profiles>标签下添加以下配置: <profile> <id>cdh</id&…
在平时的开发中,我们往往不会使用默认的中央仓库,默认的中央仓库访问的速度比较慢,访问的人或许很多,有时候也无法满足我们项目的需求,可能项目需要的某些构件中央仓库中是没有的,而在其他远程仓库中有,如JBoss Maven仓库.这时,可以在pom.xml中配置该仓库,代码如下 <!-- 其他仓库,按设定顺序进行查找. --><repositories> <repository> <id>org.springframework.maven.milestone<…
最近在开发一个公司内部的公共组件库.老大整理了git仓库里的一些项目,其中就包括这个项目. 项目git地址变了,于是我本地的代码提交成功后push失败. 查看远程地址 git remote -v 更改远程地址 git remote set-url origin 新地址 此处的origin我不清楚是远程仓库的名字,还是固定的,存疑. 另外,我在项目中的成员权限也从developer变成了reporter,也需要老大帮我改下 仅在此记录下以防遗忘-…
<?xml version="1.0" encoding="UTF-8"?> <!-- 英文注释已经被删除了,直接修改本地仓库地址用就行了. --> <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLoca…
https://maven.aliyun.com/mvn/view 一般使用聚合仓库(group),path是仓库地址.可点击右上角“使用指南”: 附   目前阿里云仓库的地址 https://maven.aliyun.com/repository/public https://maven.aliyun.com/nexus/content/groups/public 2个地址是等价的,只不过一个是新地址,一个是旧地址.…
添加 git remote add test1_origin git@github.com:b84955189/test1.git test1_origin:远程地址名,这里是我自定的. git@github.com:b84955189/test1.git:仓库地址,从Github复制即可. 查看 简单查看:git remote 详情查看:git remote -v 修改 git remote set-url test1_origin git@github.com:b84955189/test.…
以前的老项目需要修改git路径,为了保留之前的上传记录和分支等可以通过以下方法解决这个问题 sourceTree项目远程仓库,直接修改origin路径,然后提交一个commit即可将项目上传到新的git路径 命令行 cd .git //进入项目git目录 vim config //修改config配置文件,快速找到remote "origin"下面的url并替换即可实现快速关联和修改 git commit -m "提交一个commit"…
强行推送远程仓库 #把一个现有的工程拷贝一份 #去掉远程仓库关联 git remote rm origin #添加远程仓库关联 git remote add origin http://xxx.git #强行推送 git push origin --force #可能会推不上去,提示,要确定推动到哪个分支 $ git push origin --force fatal: The current branch dev has no upstream branch. To push the curr…
1.http://repo1.maven.org/maven2 (官方,速度一般) 2.http://maven.aliyun.com/nexus/content/repositories/central/ (阿里云,速度快) 3.http://repository.jboss.com/maven2/ 4.https://repository.sonatype.org/content/groups/public/ 5.http://mvnrepository.com/…
https://repo1.maven.org/maven2/ http://maven.jahia.org/maven2/ http://maven.aliyun.com/nexus/content/groups/public/ 推荐阅读 干货:2TB架构师四阶段视频教程 面经:史上最全Java多线程面试题及答案 面经:史上最全阿里高级Java面试题 面经:史上最全Spring面试题 教程:最全Spring Boot全套视频教程 书籍:进阶Java架构师必看的15本书 工具:推荐一款在线创作流…
修改maven根目录下的conf文件夹中的setting.xml文件,如果你修改了默认仓库的存储位置,即.m2文件夹下没有本地仓库,但是有个setting.xml文件,那就修改这个文件就可以. 具体内容和示意图如下: <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/…
已经配置好的设定文件: 1.创建一个本地仓库的地址 2.修改Maven中conf目录下的settings.xml文件 在此处添加修改后的本地仓库的地址   3.打开cmd 输入mvn help:system 出现BUILD SUCCESS 则表示修改成功 附件列表…
将VS2013的解决方案添加到GIT源代码管理后会增加.gitattributes和.gitignore 2个文件以及.git目录 设置远程地址的文件在.git目录下的config文件中 直接修改上图中红色框内的url地址即可. 还可以通过GIT命令来修改 1.删除后添加 git remote rm origin git remote add origin [url] 2.修改命令 git remote origin set-url [url] 再次启动同步会提示输入用户名密码只要输入正确后就可…