I accidently removed a hosted snapshot repository from Nexus containing a few artifacts needed by other developers on my team. Fine, I'll be able to recreate it fairly easy, but when I tried to add the repository again with the same name as the one I removed, the "Upload Artifact" tab did not show. I tried to clean the cache and reindex the public and public snapshot repos, but that didn't help. I also tried setting an alternative storage path by entering an alternative path on "Override Local Storage Location", same result.
Will I have to create a brand new repository with a different name and change all repository reference in my projects?
Thanks,
David
You should be able to create the new repo without any problem. It's possible you where inheriting permissions to this repo via a group and when you made the new repo you didn't add it to the group.
Also, all delete operations in Nexus simply move files to the sonatype-work/nexus/trash so you could have just copied all those files back directly on the disk after recreating the repo.
I think I noticed that snapshot repositories do not have the Artifact Upload tab, so possibly you created it as a snapshot repo?
Related
I have been unable to find how to rename a local repo in GitKraken, or if this feature is unavailable.
I believe the option was available if you use the Init feature to generate the local and remote repos, but I'm wanting to update the repo name after it's already been set up and used.
(I set up my remote repo on BitBucket, then cloned my local repo in GitKraken, and it just uses the last folder name in the local path as the repo name.)
My recommendation would be to push everything you have to repo, then rename on the repository itself online, then re-clone from the new location as if it was a new repo.
This is the top result when searching for solutions to this issue.
In case anyone stumbles across this post, these days GitKraken has the ability (at least it does on macOS) to add aliases to existing repos which resolves this issue for me.
To add an alias, you first need to open the repo, then right-click the tab (in the tab bar at the top), and choose the "Alias repository" option. This will then allow you to define an alternative name for that particular repo.
A screenshot showing the open, tab context menu.
Happy aliasing! :)
I am working on a project which is hosted on a particular gitlab repository. Often we dont get to connect to this repository because of network issues. Hence I have created my own local gitlab repository.
Now to keep the both repositories updated, i have to copy paste the code from one folder linked to one repository to other folder which is linked to other repository.
Is there a way in intellij wherein i can work in the same window but when committing and pushing the changes, both the repositories get updated at the same time ?
Regards,
Thanks in advance
Personally, I think it is far, far easier to use Git from the terminal/powershell.
If you are interested in using the terminal, or powershell, with Git, and want set multiple remote origins, then there is a already a detailed answer about pushing and pulling from multiple remote locations.
Otherwise, look at Intellij's VCS menu, then select "Git."
Then select "remotes":
Then get add your other Git remotes by clicking "+" and add:
Add you should be set. Just select which remote you would like to push to.
I deployed some artifacts and I copy-pasted wrong name of those artifacts. I remember that manual playing with repository content brings problems.
What is the recommended way for dealing with these situations?
EDITED:
I thought there was no way of deleting artifacts from hosted repositories via web interface. Now I see that in the "Browse storage" section I can delete the artifact directory, which is the the recommended way I guess.
Yup, in the past I've just deleted artifacts using the web GUI, no problems
login as administrator, delete the artifacts you want to remove, and rebuild index for this repo.
On my installation (Nexus 3.23, with a Python repository), the "delete component" isn't available in the WebGUI from the browse interface (even logged in as local admin).
However, if you use the "Advanced search" feature and select the desired component/package, then the delete function is available, so it's the only way I found to delete a package.
In Nexus 2, you can right-click on the element and select "Delete":
1)click on settings
2)click on Repositories
3)click on the Repository that you wish to delete
4)click on delete Repository on the top left corner
5)Repository will be deleted
Is there a way to use Github and Unfuddle for the same repo? I am responsible for a repo hosted at Unfuddle, but I am not the main owner and it's private because it's part of an ongoing project. I still need to update the repo there when changes are made, but I would like to use the same set of files to create and update a public Github repo associated with my own account, is that possible? The reason I want to use the same files is that it's a WordPress plugin and it needs to be tested before I commit changes, therefore I need to use one set of files to not complicate the matter. Any help would be appreciated.
You can set up both the repositories as remotes and push/pull to and from both of them; Git is decentralized and thus doesn't really care about whether you have one remote or many.
http://www.kernel.org/pub/software/scm/git/docs/git-remote.html
Example:
git remote add github git#github.com:username/reponame.git
and then...
git push github <branchname>
git pull github
git log github/<branchname>
etc...
Create your github repository, then from your Unfuddle local repository, run:
git remote add github git#github.com:YourUsername/YourReponame.git
Where YourUsername is your github user name, and YourRepository is your repository name. After setting up the github repository, the above URL with the user name and repository name filled in, should appear on your github repository page anyway.
Everything works like you'd expect, for example, pushing:
git push github
Your settings for the Unfuddle repository will work like before.
http://maven.apache.org/settings.html As per documentation the user specific settings can be either copied to the .m2 folder or under the maven installation. If a developer changes a machine or gets a new user id, such properties have to be copied manually to these newer machines.
Would it be possible to store user specific setting information in the repository itself (say SVN) and somehow have the mvn scripts load it on startup.
If the content of the settings.xml is not that user specific (e.g. for mirrors), you could store the whole Maven install in SVN with a customized conf/settings.xml and have the developers grab it from SVN to "install" it on a new machine as described in this previous answer.
If the content of the settings.xml is really user specific (e.g. it contains secret things like passwords), then it must be located in ~/.m2 and you will have to somehow make it available at the new location. If a developer logs on another machine, you could use "Roaming user profile". If a developer gets another id, then you'll really have to duplicate it. The technical solution may depend on the level of confidentiality required.
And if you have several developers sharing a userid but still need different settings.xml, then you'll have to pass it to Maven using the -s option. One could imagine storing these custom settings.xml in the project in that case (assuming it doesn't contain sensitive information). For example:
mvn -s settings-user1.xml <goal>
Nope, the whole point of having user settings is to store them outside the maven projects. There's nothing stopping you from creating your own svn repository and storing your configuration files there, though. You could write some shell scripts to bootstrap a new workstation from that repository, but it really depends how often you do this to make it worthwhile.
I would suggest that you setup your own repository such as Archiva, Nexus or Artifactory. Which will get your dependencies/plugins , then you can use mirror to specify explicitly just one repository to be used(the one you setup on your network). So whenever developer changes machine or dependencies are needed for multiple developers the internal mirror can be used as repo, your dependencies/plugins will download in no time to your local repository/ies