Xcode: How do I clean a corrupt repository list? - xcode8

I have a list of repository locales that are not in sync with the accounts. In fact, I think it is corrupt. I tried to reset it via the Accounts in Preferences. But there's no effect.
Where is the list of repository locales stored in Xcode so I can remove or re-sync them with the accounts?
Note: I'm also working within a workspace.

You can find a "-" button on the bottom of the repository list:

Related

Need a way to update two gitlab repositories through single intellij project window

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.

How to share Code Style settings between developers in IntelliJ

I would like all developers on my team to use the same default code style settings. We all use IntelliJ 11+ as our IDE and we use git as our source control system.
What is the easiest way to make sure they're all using the same settings? I thought there would be a way to check in the style settings into the project and have their editors discover them automatically, but that doesn't seem to be the case.
PS. I don't mind if developers consciously override some of the default settings with their own preferences, but I do want to make sure that we all at least start from a common set of default settings.
Code Style can be copied to project and saved in .idea/codeStyles to be shared via version control:
Copy to Project Click this button to create a copy of the current global scheme to the project level. After creating the copy, IntelliJ
IDEA suggests to switch to this new scheme at the project level.
The Settings Repository feature was introduced at IntelliJ IDEA 2016.
This option helps us to share IDE settings between different computers, including sharing settings between developers.
The settings are stored at Git repository, for example on GitHub or Bitbucket.
To setup Git repository we should set URL via Settings Repository menu option.
The developer can load remote settings, overwrite remote settings or merge local settings with remote ones.
The structure of Git repository with settings:
I used personal access token for GitHub authentication.
More information:
Settings Repository
Creating a personal access token for the command line
I came across this long after the fact, but thought I'd share if anyone ran into this. Add the following to your .gitignore
# IDE - IntelliJ
/.idea/*
# Keep the code styles.
!/.idea/codeStyles
/.idea/codeStyles/*
!/.idea/codeStyles/Project.xml
!/.idea/codeStyles/codeStyleConfig.xml
# Keep the inspection levels
!/.idea/inspectionProfiles
/.idea/inspectionProfiles/*
!/.idea/inspectionProfiles/Project_Default.xml
And of course, make sure your .gitignore also has a ! in front of it so these changes get picked up.
Basically, gitignore's recursive looking is a little wonky, so the below ignores a directory's contents, except for a subdirectory, then ignores that subdirectory's contents, except for the files we want.
codeStyleConfig lets you use per project settings, the project file itself is your actual code styles, and I included the Project_Default as it holds the warning levels, which you likely want if you're doing the code style work anyways.
You can create .editorconfig file in Your project (and it can be managed on directory level). More info on https://www.jetbrains.com/help/idea/configuring-code-style.html#editorconfig and https://editorconfig.org/
With this approach You can keep all Your code style settings in one file and it's not limited to IJ only.

Remove artifacts from Nexus repository

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

user specific maven settings in repository

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

Nexus: removing repository

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?